summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-01-16 05:14:33 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-01-16 05:14:33 +0000
commit572756ac1109b3aea5f57ef354827e7ea4b5b5ec (patch)
tree628cbc129f61ba4d7e3b857a34cef1b00e562daa /llvm/test/CodeGen
parentea7131a06207d75414604e689303a1137568a003 (diff)
downloadbcm5719-llvm-572756ac1109b3aea5f57ef354827e7ea4b5b5ec.tar.gz
bcm5719-llvm-572756ac1109b3aea5f57ef354827e7ea4b5b5ec.zip
Spill R4 if it's going to be used to restore SP from FP.
llvm-svn: 123567
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Thumb/2011-EpilogueBug.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Thumb/2011-EpilogueBug.ll b/llvm/test/CodeGen/Thumb/2011-EpilogueBug.ll
new file mode 100644
index 00000000000..16789e66cc1
--- /dev/null
+++ b/llvm/test/CodeGen/Thumb/2011-EpilogueBug.ll
@@ -0,0 +1,17 @@
+; RUN: llc -mtriple=thumbv6-apple-darwin < %s | FileCheck %s
+; r8869722
+
+%struct.state = type { i32, %struct.info*, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* }
+%struct.info = type { i32, i32, i32, i32, i32, i32, i32, i8* }
+
+define void @t1(%struct.state* %v) {
+; CHECK: push {r4
+ %tmp6 = load i32* null
+ %tmp8 = alloca float, i32 %tmp6
+ store i32 1, i32* null
+ br label %return
+
+return: ; preds = %0
+; CHECK: mov sp, r4
+ ret void
+}
OpenPOWER on IntegriCloud