1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -passes=newgvn -S %s | FileCheck %s 3 4define hidden void @foo() { 5; CHECK-LABEL: @foo( 6; CHECK-NEXT: top: 7; CHECK-NEXT: br label [[IF:%.*]] 8; CHECK: if: 9; CHECK-NEXT: br i1 false, label [[L50:%.*]], label [[IF]] 10; CHECK: L50: 11; CHECK-NEXT: store i8 poison, ptr null, align 1 12; CHECK-NEXT: ret void 13; 14top: 15 %.promoted = load i8, ptr undef, align 8 16 br label %if 17 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. 21 22if: ; preds = %if, %top 23 %0 = phi i8 [ %1, %if ], [ %.promoted, %top ] 24 %1 = xor i8 %0, undef 25 br i1 false, label %L50, label %if 26 27L50: ; preds = %if 28 %.lcssa = phi i8 [ %1, %if ] 29 store i8 %.lcssa, ptr undef, align 8 30 ret void 31} 32