1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=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
6 define void @patatino() {
7 ; CHECK-LABEL: @patatino(
9 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr @d, align 4
10 ; CHECK-NEXT: br label [[FOR_END10:%.*]]
12 ; CHECK-NEXT: [[OR:%.*]] = or i32 [[TMP0]], 8
13 ; CHECK-NEXT: br i1 undef, label [[IF_END:%.*]], label [[FOR_END10]]
15 ; CHECK-NEXT: ret void
18 %0 = load i32, ptr @d, align 4
22 %f.0 = phi i32 [ undef, %entry ], [ 8, %for.end10 ]
24 %mul12 = mul nsw i32 %or, undef
25 br i1 undef, label %if.end, label %for.end10