1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/CodeGen/XCore/2009-01-08-Crash.ll
Richard Osborne ce265d8cf9 Don't fold address calculations which use negative offsets into
the ADDRspii addressing mode.

llvm-svn: 62258
2009-01-15 11:32:30 +00:00

13 lines
434 B
LLVM

; 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
}