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