32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=newgvn %s -S -o - | FileCheck %s3define hidden void @foo() {4; CHECK-LABEL: @foo(5; CHECK-NEXT: top:6; CHECK-NEXT: br label [[IF:%.*]]7; CHECK: if:8; CHECK-NEXT: br i1 false, label [[L50:%.*]], label [[IF]]9; CHECK: L50:10; CHECK-NEXT: store i8 poison, ptr null, align 111; CHECK-NEXT: ret void12;13top:14 %.promoted = load double, ptr undef, align 815 br label %if16 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 cycle19;; through every value.20 21if: ; preds = %if, %top22 %0 = phi double [ %1, %if ], [ %.promoted, %top ]23 %1 = fadd double %0, 1.024 br i1 false, label %L50, label %if25 26L50: ; preds = %if27 %.lcssa = phi double [ %1, %if ]28 store double %.lcssa, ptr undef, align 829 ret void30}31 32