brintos

brintos / llvm-project-archived public Read only

0
0
Text · 571 B · 0541b8d Raw
19 lines · plain
1; RUN: llc < %s -mtriple=mipsel -mcpu=mips32 -fast-isel -frame-pointer=all -relocation-model=pic < %s2 3; Test that negative array access don't crash constant synthesis when fast isel4; generates negative offsets.5 6define i16 @test() {7  %a = alloca [4 x i16], align 48  %arrayidx = getelementptr inbounds [4 x i16], ptr %a, i32 0, i32 -29  %b = load i16, ptr %arrayidx, align 210  ret i16 %b11}12 13define void @test2() {14  %a = alloca [4 x i16], align 415  %arrayidx = getelementptr inbounds [4 x i16], ptr %a, i32 0, i32 -216  store i16 2, ptr %arrayidx, align 217  ret void18}19