1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=newgvn -S %s | FileCheck %s
4 define hidden void @foo() {
7 ; CHECK-NEXT: br label [[IF:%.*]]
9 ; CHECK-NEXT: br i1 false, label [[L50:%.*]], label [[IF]]
11 ; CHECK-NEXT: store i8 poison, ptr null, align 1
12 ; CHECK-NEXT: ret void
15 %.promoted = load i8, ptr undef, align 8
18 ;; This is really a multi-valued phi, because the phi is defined by an expression of the phi.
19 ;; This means that we can't propagate the value over the backedge, because we'll just cycle
20 ;; through every value.
22 if: ; preds = %if, %top
23 %0 = phi i8 [ %1, %if ], [ %.promoted, %top ]
25 br i1 false, label %L50, label %if
28 %.lcssa = phi i8 [ %1, %if ]
29 store i8 %.lcssa, ptr undef, align 8