summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/2009-09-10-postdec.ll
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-09-10 22:09:31 +0000
committerBob Wilson <bob.wilson@apple.com>2009-09-10 22:09:31 +0000
commit39f51320cad0a96ec6577d107f3de3f155ad179c (patch)
tree2a2ab6477325393fc3c4cb85432b605f9bf1bd99 /llvm/test/CodeGen/ARM/2009-09-10-postdec.ll
parent50f0376f49775aeb580b9428d8ac081e395b21c5 (diff)
downloadbcm5719-llvm-39f51320cad0a96ec6577d107f3de3f155ad179c.tar.gz
bcm5719-llvm-39f51320cad0a96ec6577d107f3de3f155ad179c.zip
Don't swap the operands of a subtraction when trying to create a
post-decrement load/store. llvm-svn: 81464
Diffstat (limited to 'llvm/test/CodeGen/ARM/2009-09-10-postdec.ll')
-rw-r--r--llvm/test/CodeGen/ARM/2009-09-10-postdec.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/2009-09-10-postdec.ll b/llvm/test/CodeGen/ARM/2009-09-10-postdec.ll
new file mode 100644
index 00000000000..10653b51c14
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/2009-09-10-postdec.ll
@@ -0,0 +1,11 @@
+; RUN: llc -march=arm < %s | FileCheck %s
+; Radar 7213850
+
+define i32 @test(i8* %d, i32 %x, i32 %y) nounwind {
+ %1 = ptrtoint i8* %d to i32
+;CHECK: sub
+ %2 = sub i32 %x, %1
+ %3 = add nsw i32 %2, %y
+ store i8 0, i8* %d, align 1
+ ret i32 %3
+}
OpenPOWER on IntegriCloud