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:
|
2013-07-31 02:47:52 +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:
|
2013-07-31 02:47:52 +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:
|
2013-07-31 02:47:52 +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:
|
2013-07-31 02:47:52 +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:
|
2013-07-31 02:47:52 +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:
|
2013-07-31 02:47:52 +00:00
|
|
|
; CHECK: fdiv qword ptr
|
2009-11-22 11:45:44 +00:00
|
|
|
|