llvm.org GIT mirror llvm / dbd1588
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12837 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
1 changed file(s) with 34 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=x86 | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
1
2 ; Test that the load of the constant is folded into the operation.
3
4 double %test_add(double %P) {
5 %tmp.1 = add double %P, 0x405EC00000000000
6 ret double %tmp.1
7 }
8
9 double %test_mul(double %P) {
10 %tmp.1 = mul double %P, 0x405EC00000000000
11 ret double %tmp.1
12 }
13
14 double %test_sub(double %P) {
15 %tmp.1 = sub double %P, 0x405EC00000000000
16 ret double %tmp.1
17 }
18
19 double %test_subr(double %P) {
20 %tmp.1 = sub double 0x405EC00000000000, %P
21 ret double %tmp.1
22 }
23
24 double %test_div(double %P) {
25 %tmp.1 = div double %P, 0x405EC00000000000
26 ret double %tmp.1
27 }
28
29 double %test_divr(double %P) {
30 %tmp.1 = div double 0x405EC00000000000, %P
31 ret double %tmp.1
32 }
33