2017-08-02 08:28:10 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-- -x86-asm-syntax=intel -mcpu=i486 | FileCheck %s
|
2004-04-12 04:24:01 +08:00
|
|
|
; Test that the load of the constant is folded into the operation.
|
|
|
|
|
|
|
|
|
2008-02-21 15:42:26 +08:00
|
|
|
define double @foo_add(double %P) {
|
2009-06-05 06:49:04 +08:00
|
|
|
%tmp.1 = fadd double %P, 1.230000e+02 ; <double> [#uses=1]
|
2008-02-21 15:42:26 +08:00
|
|
|
ret double %tmp.1
|
2004-04-12 04:24:01 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: foo_add:
|
2013-07-31 10:47:52 +08:00
|
|
|
; CHECK: fadd dword ptr
|
2004-04-12 04:24:01 +08:00
|
|
|
|
2008-02-21 15:42:26 +08:00
|
|
|
define double @foo_mul(double %P) {
|
2009-06-05 06:49:04 +08:00
|
|
|
%tmp.1 = fmul double %P, 1.230000e+02 ; <double> [#uses=1]
|
2008-02-21 15:42:26 +08:00
|
|
|
ret double %tmp.1
|
2004-04-12 04:24:01 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: foo_mul:
|
2013-07-31 10:47:52 +08:00
|
|
|
; CHECK: fmul dword ptr
|
2004-04-12 04:24:01 +08:00
|
|
|
|
2008-02-21 15:42:26 +08:00
|
|
|
define double @foo_sub(double %P) {
|
2009-06-05 06:49:04 +08:00
|
|
|
%tmp.1 = fsub double %P, 1.230000e+02 ; <double> [#uses=1]
|
2008-02-21 15:42:26 +08:00
|
|
|
ret double %tmp.1
|
2004-04-12 04:24:01 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: foo_sub:
|
2013-07-31 10:47:52 +08:00
|
|
|
; CHECK: fadd dword ptr
|
2004-04-12 04:24:01 +08:00
|
|
|
|
2008-02-21 15:42:26 +08:00
|
|
|
define double @foo_subr(double %P) {
|
2009-06-05 06:49:04 +08:00
|
|
|
%tmp.1 = fsub double 1.230000e+02, %P ; <double> [#uses=1]
|
2008-02-21 15:42:26 +08:00
|
|
|
ret double %tmp.1
|
2004-04-12 04:24:01 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: foo_subr:
|
2013-07-31 10:47:52 +08:00
|
|
|
; CHECK: fsub qword ptr
|
2004-04-12 04:24:01 +08:00
|
|
|
|
2008-02-21 15:42:26 +08:00
|
|
|
define double @foo_div(double %P) {
|
|
|
|
%tmp.1 = fdiv double %P, 1.230000e+02 ; <double> [#uses=1]
|
|
|
|
ret double %tmp.1
|
2004-04-12 04:24:01 +08:00
|
|
|
}
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: foo_div:
|
2013-07-31 10:47:52 +08:00
|
|
|
; CHECK: fdiv dword ptr
|
2004-04-12 04:24:01 +08:00
|
|
|
|
2008-02-21 15:42:26 +08: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 14:24:09 +08:00
|
|
|
; CHECK-LABEL: foo_divr:
|
2013-07-31 10:47:52 +08:00
|
|
|
; CHECK: fdiv qword ptr
|
2009-11-22 19:45:44 +08:00
|
|
|
|