For PR1319: Upgrade to new test harness.
[oota-llvm.git] / test / CodeGen / X86 / fp_constant_op.llx
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
2 ; RUN:   grep ST | not grep {fadd\\|fsub\\|fdiv\\|fmul}
3
4 ; Test that the load of the constant is folded into the operation.
5
6 double %test_add(double %P) {
7         %tmp.1 = add double %P, 0x405EC00000000000
8         ret double %tmp.1
9 }
10
11 double %test_mul(double %P) {
12         %tmp.1 = mul double %P, 0x405EC00000000000
13         ret double %tmp.1
14 }
15
16 double %test_sub(double %P) {
17         %tmp.1 = sub double %P, 0x405EC00000000000
18         ret double %tmp.1
19 }
20
21 double %test_subr(double %P) {
22         %tmp.1 = sub double 0x405EC00000000000, %P
23         ret double %tmp.1
24 }
25
26 double %test_div(double %P) {
27         %tmp.1 = div double %P, 0x405EC00000000000
28         ret double %tmp.1
29 }
30
31 double %test_divr(double %P) {
32         %tmp.1 = div double 0x405EC00000000000, %P
33         ret double %tmp.1
34 }
35