Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86 -x86-asm-syntax=intel -mcpu=i486 | FileCheck %s
      2 ; Test that the load of the constant is folded into the operation.
      3 
      4 
      5 define double @foo_add(double %P) {
      6 	%tmp.1 = fadd double %P, 1.230000e+02		; <double> [#uses=1]
      7 	ret double %tmp.1
      8 }
      9 ; CHECK: foo_add:
     10 ; CHECK: fadd DWORD PTR
     11 
     12 define double @foo_mul(double %P) {
     13 	%tmp.1 = fmul double %P, 1.230000e+02		; <double> [#uses=1]
     14 	ret double %tmp.1
     15 }
     16 ; CHECK: foo_mul:
     17 ; CHECK: fmul DWORD PTR
     18 
     19 define double @foo_sub(double %P) {
     20 	%tmp.1 = fsub double %P, 1.230000e+02		; <double> [#uses=1]
     21 	ret double %tmp.1
     22 }
     23 ; CHECK: foo_sub:
     24 ; CHECK: fadd DWORD PTR
     25 
     26 define double @foo_subr(double %P) {
     27 	%tmp.1 = fsub double 1.230000e+02, %P		; <double> [#uses=1]
     28 	ret double %tmp.1
     29 }
     30 ; CHECK: foo_subr:
     31 ; CHECK: fsub QWORD PTR
     32 
     33 define double @foo_div(double %P) {
     34 	%tmp.1 = fdiv double %P, 1.230000e+02		; <double> [#uses=1]
     35 	ret double %tmp.1
     36 }
     37 ; CHECK: foo_div:
     38 ; CHECK: fdiv DWORD PTR
     39 
     40 define double @foo_divr(double %P) {
     41 	%tmp.1 = fdiv double 1.230000e+02, %P		; <double> [#uses=1]
     42 	ret double %tmp.1
     43 }
     44 ; CHECK: foo_divr:
     45 ; CHECK: fdiv QWORD PTR
     46 
     47