diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-07-28 05:48:47 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-07-28 05:48:47 +0000 |
commit | 6495f63945e8dbde81f03a1dc2ab421993b9a495 (patch) | |
tree | 3938678849c493091334cec9e5e426962ea88090 /test/CodeGen | |
parent | f4b64f67b6d397cedcb8a9c0539f62957cca1627 (diff) | |
download | external_llvm-6495f63945e8dbde81f03a1dc2ab421993b9a495.zip external_llvm-6495f63945e8dbde81f03a1dc2ab421993b9a495.tar.gz external_llvm-6495f63945e8dbde81f03a1dc2ab421993b9a495.tar.bz2 |
- 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')
-rw-r--r-- | test/CodeGen/Thumb2/large-stack.ll | 28 |
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 0000000..60604f0 --- /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 +} |