1 ; RUN: llc --mtriple=loongarch32 < %s
2 ; RUN: llc --mtriple=loongarch64 < %s
4 ;; This should not crash the code generator.
6 @.str.2 = external dso_local unnamed_addr constant [69 x i8], align 1
8 define dso_local void @main() {
10 %n0 = alloca [2 x [3 x i32]], align 4
11 %0 = load i32, ptr poison, align 4
12 %idxprom15 = sext i32 %0 to i64
13 %arrayidx16 = getelementptr inbounds [2 x [3 x i32]], ptr %n0, i64 0, i64 %idxprom15
14 %arrayidx17 = getelementptr inbounds [3 x i32], ptr %arrayidx16, i64 0, i64 0
15 %1 = load i32, ptr %arrayidx17, align 4
16 call void (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef signext %1)
20 declare void @printf(ptr, ...)