3 ; This testcase used to crash. See PR29132.
5 target triple = "x86_64-unknown-linux-gnu"
7 @a = common local_unnamed_addr global i16 0, align 2
8 @c = common global i32 0, align 4
9 @d = common local_unnamed_addr global i8 0, align 1
10 @b = common global i32 0, align 4
12 ; Function Attrs: norecurse nounwind optsize uwtable
13 define i32 @main() local_unnamed_addr #0 {
15 %0 = load volatile i32, ptr @c, align 4
16 %tobool = icmp eq i32 %0, 0
17 %1 = load i16, ptr @a, align 2
18 br i1 %tobool, label %lor.rhs, label %lor.end
20 lor.rhs: ; preds = %entry
22 store i16 %inc, ptr @a, align 2
25 lor.end: ; preds = %entry, %lor.rhs
26 %2 = phi i16 [ %inc, %lor.rhs ], [ %1, %entry ]
28 store i16 %dec, ptr @a, align 2
29 %3 = load i8, ptr @d, align 1
31 %tobool4 = icmp eq i16 %dec, 0
32 br i1 %tobool4, label %land.end, label %land.rhs
34 land.rhs: ; preds = %lor.end
35 %4 = load volatile i32, ptr @b, align 4
36 %tobool5 = icmp ne i32 %4, 0
39 land.end: ; preds = %lor.end, %land.rhs
40 %5 = phi i1 [ false, %lor.end ], [ %tobool5, %land.rhs ]
41 %land.ext = zext i1 %5 to i8
42 %or = or i8 %land.ext, %sub
43 store i8 %or, ptr @d, align 1
47 attributes #0 = { norecurse nounwind optsize uwtable "target-cpu"="x86-64" }