1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=jump-threading -verify-dom-info < %s | FileCheck %s
4 @global = external global i64, align 8
9 ; CHECK-NEXT: br label [[BB1:%.*]]
11 ; CHECK-NEXT: [[TMP:%.*]] = load i64, ptr @global, align 8
12 ; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i64 [[TMP]], 0
13 ; CHECK-NEXT: br i1 [[TMP2]], label [[BB27:%.*]], label [[BB3:%.*]]
15 ; CHECK-NEXT: [[TMP4:%.*]] = load i64, ptr @global, align 8
16 ; CHECK-NEXT: [[TMP5:%.*]] = icmp eq i64 [[TMP4]], 0
17 ; CHECK-NEXT: br i1 [[TMP5]], label [[BB23:%.*]], label [[BB23]]
19 ; CHECK-NEXT: br label [[BB26:%.*]]
21 ; CHECK-NEXT: br label [[BB1]]
23 ; CHECK-NEXT: br label [[BB26]]
29 %tmp = load i64, ptr @global, align 8
30 %tmp2 = icmp eq i64 %tmp, 0
31 br i1 %tmp2, label %bb27, label %bb3
34 %tmp4 = load i64, ptr @global, align 8
35 %tmp5 = icmp eq i64 %tmp4, 0
36 br i1 %tmp5, label %bb6, label %bb7
42 %tmp8 = phi i1 [ true, %bb3 ], [ undef, %bb6 ]
43 %tmp9 = select i1 %tmp8, i64 %tmp4, i64 0
44 br i1 false, label %bb10, label %bb23
47 %tmp11 = load i64, ptr @global, align 8
48 %tmp12 = icmp slt i64 %tmp11, 5
49 br i1 %tmp12, label %bb13, label %bb17
55 br i1 undef, label %bb15, label %bb16
67 br i1 undef, label %bb22, label %bb13
70 br i1 undef, label %bb20, label %bb21
82 br i1 undef, label %bb24, label %bb13
85 br i1 undef, label %bb26, label %bb25