brintos

brintos / llvm-project-archived public Read only

0
0
Text · 929 B · d6574d7 Raw
34 lines · plain
1; RUN: opt -passes=instcombine -S < %s | FileCheck %s2 3; This used to crash opt4 5@c = common global i32 0, align 46@b = common global i32 0, align 47@a = common global i16 0, align 28@d = common global i32 0, align 49 10define void @fn3() {11; CHECK: @fn312bb:13  %tmp = load i32, ptr @c, align 414  %tmp1 = icmp eq i32 %tmp, 015  br i1 %tmp1, label %bb2, label %bb616 17bb2:                                              ; preds = %bb18  %tmp3 = load i32, ptr @b, align 419  %tmp.i = add nsw i32 255, %tmp320  %tmp5 = icmp ugt i32 %tmp.i, 25421  br label %bb622 23bb6:                                              ; preds = %bb, %bb224  %tmp7 = phi i1 [ true, %bb ], [ %tmp5, %bb2 ]25  %tmp8 = zext i1 %tmp7 to i3226  %tmp10 = icmp eq i32 %tmp8, 027  %tmp12 = load i16, ptr @a, align 228  %tmp14 = icmp ne i16 %tmp12, 029  %tmp16 = select i1 %tmp10, i1 false, i1 %tmp1430  %tmp17 = zext i1 %tmp16 to i3231  store i32 %tmp17, ptr @d, align 432  ret void33}34