blob: c94261467c9dbe27fa4cac590180b8282c715520 [file] [log] [blame]
Eric Christopher7c2cdb12011-03-08 02:42:25 +00001; Without list-burr scheduling we may not see the difference in codegen here.
Preston Gurd6a8c7bf2012-04-23 21:39:35 +00002; Use a subtarget that has post-RA scheduling enabled because the anti-dependency
3; breaker requires liveness information to be kept.
4; RUN: llc < %s -march=x86-64 -mcpu=atom -post-RA-scheduler -pre-RA-sched=list-burr -break-anti-dependencies=none > %t
Chandler Carruth4177e6f2012-07-02 12:47:22 +00005; RUN: grep "%xmm0" %t | count 14
6; RUN: not grep "%xmm1" %t
Preston Gurd6a8c7bf2012-04-23 21:39:35 +00007; RUN: llc < %s -march=x86-64 -mcpu=atom -post-RA-scheduler -break-anti-dependencies=critical > %t
Chandler Carruth4177e6f2012-07-02 12:47:22 +00008; RUN: grep "%xmm0" %t | count 7
9; RUN: grep "%xmm1" %t | count 7
David Goodwin471850a2009-10-01 21:46:35 +000010
11define void @goo(double* %r, double* %p, double* %q) nounwind {
12entry:
13 %0 = load double* %p, align 8
14 %1 = fadd double %0, 1.100000e+00
15 %2 = fmul double %1, 1.200000e+00
16 %3 = fadd double %2, 1.300000e+00
17 %4 = fmul double %3, 1.400000e+00
18 %5 = fadd double %4, 1.500000e+00
19 %6 = fptosi double %5 to i32
20 %7 = load double* %r, align 8
21 %8 = fadd double %7, 7.100000e+00
22 %9 = fmul double %8, 7.200000e+00
23 %10 = fadd double %9, 7.300000e+00
24 %11 = fmul double %10, 7.400000e+00
25 %12 = fadd double %11, 7.500000e+00
26 %13 = fptosi double %12 to i32
27 %14 = icmp slt i32 %6, %13
28 br i1 %14, label %bb, label %return
29
30bb:
31 store double 9.300000e+00, double* %q, align 8
32 ret void
33
34return:
35 ret void
36}