diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-12-04 04:40:19 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-12-04 04:40:19 +0000 |
commit | c24130bade8c348d0d437644b01ebdd3c65e6681 (patch) | |
tree | bc7f8a93d7a6e98e34b53362093eb3bee5b0a9fe /test | |
parent | 7f762187209baded73a24a9040edb6b3b29bada4 (diff) | |
download | external_llvm-c24130bade8c348d0d437644b01ebdd3c65e6681.zip external_llvm-c24130bade8c348d0d437644b01ebdd3c65e6681.tar.gz external_llvm-c24130bade8c348d0d437644b01ebdd3c65e6681.tar.bz2 |
The Thumb tADDrSPi instruction is not valid when the destination is SP.
Check for that and try narrowing it to tADDspi instead. Radar 8724703.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/Thumb2/2010-12-03-AddSPNarrowing.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/2010-12-03-AddSPNarrowing.ll b/test/CodeGen/Thumb2/2010-12-03-AddSPNarrowing.ll new file mode 100644 index 0000000..5b91a5f --- /dev/null +++ b/test/CodeGen/Thumb2/2010-12-03-AddSPNarrowing.ll @@ -0,0 +1,11 @@ +; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s +; Radar 8724703: Make sure that a t2ADDrSPi instruction with SP as the +; destination register is narrowed to tADDspi instead of tADDrSPi. + +define void @test() nounwind { +entry: +; CHECK: sub.w +; CHECK: add.w + %Buffer.i = alloca [512 x i8], align 4 + ret void +} |