XCore target: add XCoreTargetLowering::isZExtFree()
[oota-llvm.git] / test / CodeGen / XCore / 2009-01-08-Crash.ll
1 ; RUN: llc < %s -march=xcore > %t1.s
2 ;; This caused a compilation failure since the
3 ;; address arithmetic was folded into the LDWSP instruction,
4 ;; resulting in a negative offset which eliminateFrameIndex was
5 ;; unable to eliminate.
6 define i32 @test(i32 %bar) nounwind readnone {
7 entry:
8         %bar_addr = alloca i32
9         %0 = getelementptr i32* %bar_addr, i32 -1
10         %1 = load i32* %0, align 4
11         ret i32 %1
12 }