Eric Christopher | 7c2cdb1 | 2011-03-08 02:42:25 +0000 | [diff] [blame] | 1 | ; Without list-burr scheduling we may not see the difference in codegen here. |
Preston Gurd | 6a8c7bf | 2012-04-23 21:39:35 +0000 | [diff] [blame] | 2 | ; 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 Carruth | 4177e6f | 2012-07-02 12:47:22 +0000 | [diff] [blame^] | 5 | ; RUN: grep "%xmm0" %t | count 14 |
| 6 | ; RUN: not grep "%xmm1" %t |
Preston Gurd | 6a8c7bf | 2012-04-23 21:39:35 +0000 | [diff] [blame] | 7 | ; RUN: llc < %s -march=x86-64 -mcpu=atom -post-RA-scheduler -break-anti-dependencies=critical > %t |
Chandler Carruth | 4177e6f | 2012-07-02 12:47:22 +0000 | [diff] [blame^] | 8 | ; RUN: grep "%xmm0" %t | count 7 |
| 9 | ; RUN: grep "%xmm1" %t | count 7 |
David Goodwin | 471850a | 2009-10-01 21:46:35 +0000 | [diff] [blame] | 10 | |
| 11 | define void @goo(double* %r, double* %p, double* %q) nounwind { |
| 12 | entry: |
| 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 | |
| 30 | bb: |
| 31 | store double 9.300000e+00, double* %q, align 8 |
| 32 | ret void |
| 33 | |
| 34 | return: |
| 35 | ret void |
| 36 | } |