Owen Anderson | 654d544 | 2010-09-28 21:57:50 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=arm-apple-darwin -mcpu=cortex-a9 | FileCheck %s |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 2 | ; rdar://8402126 |
| 3 | ; Make sure if-converter is not predicating vldmia and ldmia. These are |
| 4 | ; micro-coded and would have long issue latency even if predicated on |
| 5 | ; false predicate. |
| 6 | |
Evan Cheng | 8239daf | 2010-11-03 00:45:17 +0000 | [diff] [blame] | 7 | define void @t(double %a, double %b, double %c, double %d, i32* nocapture %solutions, double* nocapture %x) nounwind { |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 8 | entry: |
Evan Cheng | 8239daf | 2010-11-03 00:45:17 +0000 | [diff] [blame] | 9 | ; CHECK: t: |
| 10 | ; CHECK: vpop {d8} |
| 11 | ; CHECK-NOT: vpopne |
| 12 | ; CHECK: ldmia sp!, {r7, pc} |
| 13 | ; CHECK: vpop {d8} |
| 14 | ; CHECK: ldmia sp!, {r7, pc} |
| 15 | br i1 undef, label %if.else, label %if.then |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 16 | |
Evan Cheng | 8239daf | 2010-11-03 00:45:17 +0000 | [diff] [blame] | 17 | if.then: ; preds = %entry |
| 18 | %mul73 = fmul double undef, 0.000000e+00 |
| 19 | %sub76 = fsub double %mul73, undef |
| 20 | store double %sub76, double* undef, align 4 |
| 21 | %call88 = tail call double @cos(double 0.000000e+00) nounwind |
| 22 | %mul89 = fmul double undef, %call88 |
| 23 | %sub92 = fsub double %mul89, undef |
| 24 | store double %sub92, double* undef, align 4 |
| 25 | ret void |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 26 | |
Evan Cheng | 8239daf | 2010-11-03 00:45:17 +0000 | [diff] [blame] | 27 | if.else: ; preds = %entry |
| 28 | %tmp101 = tail call double @llvm.pow.f64(double undef, double 0x3FD5555555555555) |
| 29 | %add112 = fadd double %tmp101, undef |
| 30 | %mul118 = fmul double %add112, undef |
| 31 | store double 0.000000e+00, double* %x, align 4 |
| 32 | ret void |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 33 | } |
| 34 | |
Evan Cheng | 8239daf | 2010-11-03 00:45:17 +0000 | [diff] [blame] | 35 | declare double @acos(double) |
| 36 | |
| 37 | declare double @sqrt(double) readnone |
| 38 | |
| 39 | declare double @cos(double) readnone |
| 40 | |
| 41 | declare double @fabs(double) |
| 42 | |
| 43 | declare double @llvm.pow.f64(double, double) nounwind readonly |