diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-04-19 18:11:49 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-04-19 18:11:49 +0000 |
commit | a2881ee8a436d0b64adfc4d10852921b9b9ae732 (patch) | |
tree | e8b2a3a123f4b7ba3822696e84615ea87ca2f3ab /llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll | |
parent | df612ba0062dd6bab9a2017c05106b4a474e3de7 (diff) | |
download | bcm5719-llvm-a2881ee8a436d0b64adfc4d10852921b9b9ae732.tar.gz bcm5719-llvm-a2881ee8a436d0b64adfc4d10852921b9b9ae732.zip |
Avoid some 's' 16-bit instruction which partially update CPSR
(and add false dependency) when it isn't dependent on last CPSR defining
instruction. rdar://8928208
llvm-svn: 129773
Diffstat (limited to 'llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll b/llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll new file mode 100644 index 00000000000..d0c4f3ae9d6 --- /dev/null +++ b/llvm/test/CodeGen/ARM/avoid-cpsr-rmw.ll @@ -0,0 +1,16 @@ +; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a9 | FileCheck %s +; Avoid some 's' 16-bit instruction which partially update CPSR (and add false +; dependency) when it isn't dependent on last CPSR defining instruction. +; rdar://8928208 + +define i32 @t(i32 %a, i32 %b, i32 %c, i32 %d) nounwind readnone { + entry: +; CHECK: t: +; CHECK: muls r2, r3, r2 +; CHECK-NEXT: mul r0, r0, r1 +; CHECK-NEXT: muls r0, r2, r0 + %0 = mul nsw i32 %a, %b + %1 = mul nsw i32 %c, %d + %2 = mul nsw i32 %0, %1 + ret i32 %2 +} |