diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-09-10 01:29:16 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-09-10 01:29:16 +0000 |
| commit | bf4070756f4acbae9a556c56003f0dd71521288e (patch) | |
| tree | 73c9f913ec61f913b9eff7f8f6cd745bc94cb2ad /llvm/test/CodeGen/ARM/ifcvt10.ll | |
| parent | 516484c71e6322a3d17ce91c7107afefb35e972f (diff) | |
| download | bcm5719-llvm-bf4070756f4acbae9a556c56003f0dd71521288e.tar.gz bcm5719-llvm-bf4070756f4acbae9a556c56003f0dd71521288e.zip | |
Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.
llvm-svn: 113570
Diffstat (limited to 'llvm/test/CodeGen/ARM/ifcvt10.ll')
| -rw-r--r-- | llvm/test/CodeGen/ARM/ifcvt10.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/ifcvt10.ll b/llvm/test/CodeGen/ARM/ifcvt10.ll new file mode 100644 index 00000000000..3fd6a97c76e --- /dev/null +++ b/llvm/test/CodeGen/ARM/ifcvt10.ll @@ -0,0 +1,30 @@ +; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s +; rdar://8402126 +; Make sure if-converter is not predicating vldmia and ldmia. These are +; micro-coded and would have long issue latency even if predicated on +; false predicate. + +%0 = type { float, float, float, float } +%pln = type { %vec, float } +%vec = type { [4 x float] } + +define arm_aapcs_vfpcc float @aaa(%vec* nocapture %ustart, %vec* nocapture %udir, %vec* nocapture %vstart, %vec* nocapture %vdir, %vec* %upoint, %vec* %vpoint) { +; CHECK: aaa: +; CHECK: vldr.32 +; CHECK-NOT: vldrne +; CHECK-NOT: vldmiane +; CHECK-NOT: ldmiane +; CHECK: vldmia sp! +; CHECK: ldmia sp! +entry: + br i1 undef, label %bb81, label %bb48 + +bb48: ; preds = %entry + %0 = call arm_aapcs_vfpcc %0 @bbb(%pln* undef, %vec* %vstart, %vec* undef) nounwind ; <%0> [#uses=0] + ret float 0.000000e+00 + +bb81: ; preds = %entry + ret float 0.000000e+00 +} + +declare arm_aapcs_vfpcc %0 @bbb(%pln* nocapture, %vec* nocapture, %vec* nocapture) nounwind |

