xref: /aosp_15_r20/external/llvm/test/CodeGen/Hexagon/base-offset-post.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=hexagon -mcpu=hexagonv5 < %s
2*9880d681SAndroid Build Coastguard Worker; REQUIRES: asserts
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; Test that the accessSize is set on a post-increment store. If not, an assert
5*9880d681SAndroid Build Coastguard Worker; is triggered in getBaseAndOffset()
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker%struct.A = type { i8, i32, i32, i32, [10 x i32], [10 x i32], [80 x i32], [80 x i32], [8 x i32], i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
10*9880d681SAndroid Build Coastguard Workerdefine fastcc void @Decoder_amr(i8 zeroext %mode) #0 {
11*9880d681SAndroid Build Coastguard Workerentry:
12*9880d681SAndroid Build Coastguard Worker  br label %for.cond64.preheader.i
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Workerfor.cond64.preheader.i:
15*9880d681SAndroid Build Coastguard Worker  %i.1984.i = phi i32 [ 0, %entry ], [ %inc166.i.1, %for.cond64.preheader.i ]
16*9880d681SAndroid Build Coastguard Worker  %inc166.i = add nsw i32 %i.1984.i, 1
17*9880d681SAndroid Build Coastguard Worker  %arrayidx71.i1422.1 = getelementptr inbounds %struct.A, %struct.A* undef, i32 0, i32 7, i32 %inc166.i
18*9880d681SAndroid Build Coastguard Worker  %storemerge800.i.1 = select i1 undef, i32 1310, i32 undef
19*9880d681SAndroid Build Coastguard Worker  %sub156.i.1 = sub nsw i32 0, %storemerge800.i.1
20*9880d681SAndroid Build Coastguard Worker  %sub156.storemerge800.i.1 = select i1 undef, i32 %storemerge800.i.1, i32 %sub156.i.1
21*9880d681SAndroid Build Coastguard Worker  store i32 %sub156.storemerge800.i.1, i32* %arrayidx71.i1422.1, align 4
22*9880d681SAndroid Build Coastguard Worker  store i32 0, i32* undef, align 4
23*9880d681SAndroid Build Coastguard Worker  %inc166.i.1 = add nsw i32 %i.1984.i, 2
24*9880d681SAndroid Build Coastguard Worker  br label %for.cond64.preheader.i
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workerif.end:
27*9880d681SAndroid Build Coastguard Worker  ret void
28*9880d681SAndroid Build Coastguard Worker}
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
31