1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -correlated-propagation -S %s | FileCheck %s 3 4target triple = "x86_64-apple-darwin17.4.0" 5 6define void @patatino() { 7; CHECK-LABEL: @patatino( 8; CHECK-NEXT: br i1 undef, label [[BB3:%.*]], label [[BB4:%.*]] 9; CHECK: bb3: 10; CHECK-NEXT: br label [[BB3]] 11; CHECK: bb4: 12; CHECK-NEXT: br i1 undef, label [[BB40:%.*]], label [[BB22:%.*]] 13; CHECK: bb7: 14; CHECK-NEXT: br label [[BB14:%.*]] 15; CHECK: bb12: 16; CHECK-NEXT: br label [[BB14]] 17; CHECK: 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:%.*]] 21; CHECK: bb22: 22; CHECK-NEXT: br label [[BB24:%.*]] 23; CHECK: bb24: 24; CHECK-NEXT: br label [[BB32:%.*]] 25; CHECK: bb32: 26; CHECK-NEXT: br i1 undef, label [[BB40]], label [[BB24]] 27; CHECK: bb40: 28; CHECK-NEXT: [[TMP41:%.*]] = phi i64 [ 4, [[BB4]] ], [ [[TMP20]], [[BB14]] ], [ undef, [[BB32]] ] 29; CHECK-NEXT: ret void 30; 31 br i1 undef, label %bb3, label %bb4 32 33bb3: 34 br label %bb3 35 36bb4: 37 br i1 undef, label %bb40, label %bb22 38 39bb7: 40 br label %bb14 41 42bb12: 43 br label %bb14 44 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 49bb14: 50 %tmp19 = icmp sgt i32 undef, undef 51 %tmp20 = select i1 %tmp19, i64 %tmp20, i64 0 52 br i1 undef, label %bb40, label %bb7 53 54bb22: 55 br label %bb24 56 57bb24: 58 br label %bb32 59 60bb32: 61 br i1 undef, label %bb40, label %bb24 62 63bb40: 64 %tmp41 = phi i64 [ 4, %bb4 ], [ %tmp20, %bb14 ], [ undef, %bb32 ] 65 ret void 66} 67