diff options
author | Richard Osborne <richard@xmos.com> | 2009-01-15 11:32:30 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2009-01-15 11:32:30 +0000 |
commit | cfb1ae87c676b9d2f4b7c86506c99ab314300ec0 (patch) | |
tree | 8da2ad631d62d1aaeffd8bf818c2c1bfb2f6e3bd /test/CodeGen/XCore | |
parent | 62db116933dbc2ac61389329c39ccd00d15f066b (diff) | |
download | external_llvm-cfb1ae87c676b9d2f4b7c86506c99ab314300ec0.zip external_llvm-cfb1ae87c676b9d2f4b7c86506c99ab314300ec0.tar.gz external_llvm-cfb1ae87c676b9d2f4b7c86506c99ab314300ec0.tar.bz2 |
Don't fold address calculations which use negative offsets into
the ADDRspii addressing mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/XCore')
-rw-r--r-- | test/CodeGen/XCore/2009-01-08-Crash.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/2009-01-08-Crash.ll b/test/CodeGen/XCore/2009-01-08-Crash.ll new file mode 100644 index 0000000..6f5fb7c --- /dev/null +++ b/test/CodeGen/XCore/2009-01-08-Crash.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | llc -march=xcore > %t1.s +;; This caused a compilation failure since the +;; address arithmetic was folded into the LDWSP instruction, +;; resulting in a negative offset which eliminateFrameIndex was +;; unable to eliminate. +define i32 @test(i32 %bar) nounwind readnone { +entry: + %bar_addr = alloca i32 + %0 = getelementptr i32* %bar_addr, i32 -1 + %1 = load i32* %0, align 4 + ret i32 %1 +} |