1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2 ; RUN: opt -newgvn -S %s | FileCheck %s 3 ; Ensure we do not incorrect do phi of ops 4 @d = external local_unnamed_addr global i32, align 4 5 6 define void @patatino() { 7 ; CHECK-LABEL: @patatino( 8 ; CHECK-NEXT: entry: 9 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, i32* @d, align 4 10 ; CHECK-NEXT: br label [[FOR_END10:%.*]] 11 ; CHECK: for.end10: 12 ; CHECK-NEXT: [[OR:%.*]] = or i32 [[TMP0]], 8 13 ; CHECK-NEXT: br i1 undef, label [[IF_END:%.*]], label [[FOR_END10]] 14 ; CHECK: if.end: 15 ; CHECK-NEXT: ret void 16 ; 17 entry: 18 %0 = load i32, i32* @d, align 4 19 br label %for.end10 20 21 for.end10: 22 %f.0 = phi i32 [ undef, %entry ], [ 8, %for.end10 ] 23 %or = or i32 %0, %f.0 24 %mul12 = mul nsw i32 %or, undef 25 br i1 undef, label %if.end, label %for.end10 26 27 if.end: 28 ret void 29 } 30 31