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