1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -correlated-propagation -S %s | FileCheck %s
4 target triple = "x86_64-apple-darwin17.4.0"
6 define void @patatino() {
7 ; CHECK-LABEL: @patatino(
8 ; CHECK-NEXT: br i1 undef, label [[BB3:%.*]], label [[BB4:%.*]]
10 ; CHECK-NEXT: br label [[BB3]]
12 ; CHECK-NEXT: br i1 undef, label [[BB40:%.*]], label [[BB22:%.*]]
14 ; CHECK-NEXT: br label [[BB14:%.*]]
16 ; CHECK-NEXT: br label [[BB14]]
18 ; CHECK-NEXT: [[TMP19:%.*]] = icmp sgt i32 undef, undef
19 ; CHECK-NEXT: [[TMP20:%.*]] = select i1 [[TMP19]], i64 [[TMP20]], i64 0
20 ; CHECK-NEXT: br i1 undef, label [[BB40]], label [[BB7:%.*]]
22 ; CHECK-NEXT: br label [[BB24:%.*]]
24 ; CHECK-NEXT: br label [[BB32:%.*]]
26 ; CHECK-NEXT: br i1 undef, label [[BB40]], label [[BB24]]
28 ; CHECK-NEXT: [[TMP41:%.*]] = phi i64 [ 4, [[BB4]] ], [ [[TMP20]], [[BB14]] ], [ undef, [[BB32]] ]
29 ; CHECK-NEXT: ret void
31 br i1 undef, label %bb3, label %bb4
37 br i1 undef, label %bb40, label %bb22
45 ; This block is unreachable. Due to the non-standard definition of
46 ; dominance in LLVM where uses in unreachable blocks are dominated
47 ; by anything, it contains an instruction of the form
48 ; %def = OP %def, %something
50 %tmp19 = icmp sgt i32 undef, undef
51 %tmp20 = select i1 %tmp19, i64 %tmp20, i64 0
52 br i1 undef, label %bb40, label %bb7
61 br i1 undef, label %bb40, label %bb24
64 %tmp41 = phi i64 [ 4, %bb4 ], [ %tmp20, %bb14 ], [ undef, %bb32 ]