xref: /aosp_15_r20/external/llvm/test/CodeGen/Generic/crash.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -o -
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; PR6332
4*9880d681SAndroid Build Coastguard Worker%struct.AVCodecTag = type {}
5*9880d681SAndroid Build Coastguard Worker@ff_codec_bmp_tags = external global [0 x %struct.AVCodecTag]
6*9880d681SAndroid Build Coastguard Worker@tags = global [1 x %struct.AVCodecTag*] [%struct.AVCodecTag* getelementptr
7*9880d681SAndroid Build Coastguard Workerinbounds ([0 x %struct.AVCodecTag], [0 x %struct.AVCodecTag]* @ff_codec_bmp_tags, i32 0, i32 0)]
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; rdar://8878965
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker%struct.CAMERA = type { [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], [3 x double], double, double, i32, double, double, i32, double, i32* }
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Workerdefine void @Parse_Camera(%struct.CAMERA** nocapture %Camera_Ptr) nounwind {
15*9880d681SAndroid Build Coastguard Workerentry:
16*9880d681SAndroid Build Coastguard Worker%.pre = load %struct.CAMERA*, %struct.CAMERA** %Camera_Ptr, align 4
17*9880d681SAndroid Build Coastguard Worker%0 = getelementptr inbounds %struct.CAMERA, %struct.CAMERA* %.pre, i32 0, i32 1, i32 0
18*9880d681SAndroid Build Coastguard Worker%1 = getelementptr inbounds %struct.CAMERA, %struct.CAMERA* %.pre, i32 0, i32 1, i32 2
19*9880d681SAndroid Build Coastguard Workerbr label %bb32
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Workerbb32:                                             ; preds = %bb6
22*9880d681SAndroid Build Coastguard Worker%2 = load double, double* %0, align 4
23*9880d681SAndroid Build Coastguard Worker%3 = load double, double* %1, align 4
24*9880d681SAndroid Build Coastguard Worker%4 = load double, double* %0, align 4
25*9880d681SAndroid Build Coastguard Workercall void @Parse_Vector(double* %0) nounwind
26*9880d681SAndroid Build Coastguard Worker%5 = call i32 @llvm.objectsize.i32.p0i8(i8* undef, i1 false)
27*9880d681SAndroid Build Coastguard Worker%6 = icmp eq i32 %5, -1
28*9880d681SAndroid Build Coastguard Workerbr i1 %6, label %bb34, label %bb33
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Workerbb33:                                             ; preds = %bb32
31*9880d681SAndroid Build Coastguard Workerunreachable
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Workerbb34:                                             ; preds = %bb32
34*9880d681SAndroid Build Coastguard Workerunreachable
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker}
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Workerdeclare void @Parse_Vector(double*)
39*9880d681SAndroid Build Coastguard Workerdeclare i32 @llvm.objectsize.i32.p0i8(i8*, i1)
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker; PR9578
43*9880d681SAndroid Build Coastguard Worker%struct.S0 = type { i32, i8, i32 }
44*9880d681SAndroid Build Coastguard Worker
45*9880d681SAndroid Build Coastguard Workerdefine void @func_82() nounwind optsize {
46*9880d681SAndroid Build Coastguard Workerentry:
47*9880d681SAndroid Build Coastguard Worker  br label %for.body.i
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard Workerfor.body.i:                                       ; preds = %for.body.i, %entry
50*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %func_74.exit.for.cond29.thread_crit_edge, label %for.body.i
51*9880d681SAndroid Build Coastguard Worker
52*9880d681SAndroid Build Coastguard Workerfunc_74.exit.for.cond29.thread_crit_edge:         ; preds = %for.body.i
53*9880d681SAndroid Build Coastguard Worker  %f13576.pre = getelementptr inbounds %struct.S0, %struct.S0* undef, i64 0, i32 1
54*9880d681SAndroid Build Coastguard Worker  store i8 0, i8* %f13576.pre, align 4
55*9880d681SAndroid Build Coastguard Worker  br label %lbl_468
56*9880d681SAndroid Build Coastguard Worker
57*9880d681SAndroid Build Coastguard Workerlbl_468:                                          ; preds = %lbl_468, %func_74.exit.for.cond29.thread_crit_edge
58*9880d681SAndroid Build Coastguard Worker  %f13577.ph = phi i8* [ %f13576.pre, %func_74.exit.for.cond29.thread_crit_edge ], [ %f135.pre, %lbl_468 ]
59*9880d681SAndroid Build Coastguard Worker  store i8 1, i8* %f13577.ph, align 1
60*9880d681SAndroid Build Coastguard Worker  %f135.pre = getelementptr inbounds %struct.S0, %struct.S0* undef, i64 0, i32 1
61*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %lbl_468, label %for.end74
62*9880d681SAndroid Build Coastguard Worker
63*9880d681SAndroid Build Coastguard Workerfor.end74:                                        ; preds = %lbl_468
64*9880d681SAndroid Build Coastguard Worker  ret void
65*9880d681SAndroid Build Coastguard Worker}
66