blob: 317ed0a4f7d37916913aa0572b3c82cf0bd47a87 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; PR1075
Dan Gohmanad1cc9c2009-12-07 19:04:31 +00002; RUN: llc < %s -mtriple=x86_64-apple-darwin -O3 | FileCheck %s
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Chris Lattner9e2f6412009-08-30 21:45:23 +00004define float @foo(float %x) nounwind {
Dan Gohman7ce405e2009-06-04 22:49:04 +00005 %tmp1 = fmul float %x, 3.000000e+00
6 %tmp3 = fmul float %x, 5.000000e+00
7 %tmp5 = fmul float %x, 7.000000e+00
8 %tmp7 = fmul float %x, 1.100000e+01
9 %tmp10 = fadd float %tmp1, %tmp3
10 %tmp12 = fadd float %tmp10, %tmp5
11 %tmp14 = fadd float %tmp12, %tmp7
Dan Gohmanf17a25c2007-07-18 16:29:46 +000012 ret float %tmp14
Chris Lattner9e2f6412009-08-30 21:45:23 +000013
David Goodwine56e4a62009-10-22 23:19:17 +000014; CHECK: mulss LCPI1_3(%rip)
Evan Chengbb5d7af2009-10-23 05:58:34 +000015; CHECK-NEXT: mulss LCPI1_0(%rip)
16; CHECK-NEXT: mulss LCPI1_1(%rip)
David Goodwine56e4a62009-10-22 23:19:17 +000017; CHECK-NEXT: mulss LCPI1_2(%rip)
Evan Cheng6e2f5a42009-10-18 19:57:27 +000018; CHECK-NEXT: addss
Chris Lattner9e2f6412009-08-30 21:45:23 +000019; CHECK-NEXT: addss
Evan Chengbb5d7af2009-10-23 05:58:34 +000020; CHECK-NEXT: addss
Chris Lattner9e2f6412009-08-30 21:45:23 +000021; CHECK-NEXT: ret
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022}