summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2/large-stack.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-07-28 05:48:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-07-28 05:48:47 +0000
commit6495f63945e8dbde81f03a1dc2ab421993b9a495 (patch)
tree3938678849c493091334cec9e5e426962ea88090 /test/CodeGen/Thumb2/large-stack.ll
parentf4b64f67b6d397cedcb8a9c0539f62957cca1627 (diff)
downloadllvm-6495f63945e8dbde81f03a1dc2ab421993b9a495.tar.gz
llvm-6495f63945e8dbde81f03a1dc2ab421993b9a495.tar.bz2
llvm-6495f63945e8dbde81f03a1dc2ab421993b9a495.tar.xz
- More refactoring. This gets rid of all of the getOpcode calls.
- This change also makes it possible to switch between ARM / Thumb on a per-function basis. - Fixed thumb2 routine which expand reg + arbitrary immediate. It was using using ARM so_imm logic. - Use movw and movt to do reg + imm when profitable. - Other code clean ups and minor optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2/large-stack.ll')
-rw-r--r--test/CodeGen/Thumb2/large-stack.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/large-stack.ll b/test/CodeGen/Thumb2/large-stack.ll
new file mode 100644
index 0000000000..60604f020f
--- /dev/null
+++ b/test/CodeGen/Thumb2/large-stack.ll
@@ -0,0 +1,28 @@
+; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | FileCheck %s
+
+define void @test1() {
+; CHECK: test1:
+; CHECK: sub.w sp, sp, #256
+ %tmp = alloca [ 64 x i32 ] , align 4
+ ret void
+}
+
+define void @test2() {
+; CHECK: test2:
+; CHECK: sub.w sp, sp, #4160
+; CHECK: sub.w sp, sp, #8
+ %tmp = alloca [ 4168 x i8 ] , align 4
+ ret void
+}
+
+define i32 @test3() {
+; CHECK: test3:
+; CHECK: sub.w sp, sp, #805306368
+; CHECK: sub.w sp, sp, #16
+ %retval = alloca i32, align 4
+ %tmp = alloca i32, align 4
+ %a = alloca [805306369 x i8], align 16
+ store i32 0, i32* %tmp
+ %tmp1 = load i32* %tmp
+ ret i32 %tmp1
+}