2009-11-22 11:45:44 +00:00
|
|
|
; RUN: llc < %s -march=x86 -x86-asm-syntax=intel -mcpu=i486 | FileCheck %s
|
2004-04-11 20:24:01 +00:00
|
|
|
; Test that the load of the constant is folded into the operation.
|
|
|
|
|
|
|
|
|
2008-02-21 07:42:26 +00:00
|
|
|
define double @foo_add(double %P) {
|
2009-06-04 22:49:04 +00:00
|
|
|
%tmp.1 = fadd double %P, 1.230000e+02 ; <double> [#uses=1]
|
2008-02-21 07:42:26 +00:00
|
|
|
ret double %tmp.1
|
2004-04-11 20:24:01 +00:00
|
|
|
}
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo_add:
|
2009-11-22 12:50:05 +00:00
|
|
|
; CHECK: fadd DWORD PTR
|
2004-04-11 20:24:01 +00:00
|
|
|
|
2008-02-21 07:42:26 +00:00
|
|
|
define double @foo_mul(double %P) {
|
2009-06-04 22:49:04 +00:00
|
|
|
%tmp.1 = fmul double %P, 1.230000e+02 ; <double> [#uses=1]
|
2008-02-21 07:42:26 +00:00
|
|
|
ret double %tmp.1
|
2004-04-11 20:24:01 +00:00
|
|
|
}
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo_mul:
|
2009-11-22 12:50:05 +00:00
|
|
|
; CHECK: fmul DWORD PTR
|
2004-04-11 20:24:01 +00:00
|
|
|
|
2008-02-21 07:42:26 +00:00
|
|
|
define double @foo_sub(double %P) {
|
2009-06-04 22:49:04 +00:00
|
|
|
%tmp.1 = fsub double %P, 1.230000e+02 ; <double> [#uses=1]
|
2008-02-21 07:42:26 +00:00
|
|
|
ret double %tmp.1
|
2004-04-11 20:24:01 +00:00
|
|
|
}
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo_sub:
|
2009-11-22 12:50:05 +00:00
|
|
|
; CHECK: fadd DWORD PTR
|
2004-04-11 20:24:01 +00:00
|
|
|
|
2008-02-21 07:42:26 +00:00
|
|
|
define double @foo_subr(double %P) {
|
2009-06-04 22:49:04 +00:00
|
|
|
%tmp.1 = fsub double 1.230000e+02, %P ; <double> [#uses=1]
|
2008-02-21 07:42:26 +00:00
|
|
|
ret double %tmp.1
|
2004-04-11 20:24:01 +00:00
|
|
|
}
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo_subr:
|
2009-11-22 12:50:05 +00:00
|
|
|
; CHECK: fsub QWORD PTR
|
2004-04-11 20:24:01 +00:00
|
|
|
|
2008-02-21 07:42:26 +00:00
|
|
|
define double @foo_div(double %P) {
|
|
|
|
%tmp.1 = fdiv double %P, 1.230000e+02 ; <double> [#uses=1]
|
|
|
|
ret double %tmp.1
|
2004-04-11 20:24:01 +00:00
|
|
|
}
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo_div:
|
2009-11-22 12:50:05 +00:00
|
|
|
; CHECK: fdiv DWORD PTR
|
2004-04-11 20:24:01 +00:00
|
|
|
|
2008-02-21 07:42:26 +00:00
|
|
|
define double @foo_divr(double %P) {
|
|
|
|
%tmp.1 = fdiv double 1.230000e+02, %P ; <double> [#uses=1]
|
|
|
|
ret double %tmp.1
|
|
|
|
}
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo_divr:
|
2009-11-22 12:50:05 +00:00
|
|
|
; CHECK: fdiv QWORD PTR
|
2009-11-22 11:45:44 +00:00
|
|
|
|