1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2 ;; Ensure the store verifier is not overzealous 3 ; RUN: opt -newgvn -enable-phi-of-ops=true -S %s | FileCheck %s 4 @b = external global i16, align 2 5 6 define void @patatino() { 7 ; CHECK-LABEL: @patatino( 8 ; CHECK-NEXT: entry: 9 ; CHECK-NEXT: br i1 false, label [[FOR_COND1:%.*]], label [[FOR_INC:%.*]] 10 ; CHECK: for.cond1: 11 ; CHECK-NEXT: [[PHIOFOPS:%.*]] = phi i16 [ undef, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_INC]] ] 12 ; CHECK-NEXT: store i16 [[PHIOFOPS]], i16* @b, align 2 13 ; CHECK-NEXT: br label [[FOR_INC]] 14 ; CHECK: for.inc: 15 ; CHECK-NEXT: [[TMP0:%.*]] = load i16, i16* @b, align 2 16 ; CHECK-NEXT: [[INC]] = add i16 [[TMP0]], 1 17 ; CHECK-NEXT: store i16 [[INC]], i16* @b, align 2 18 ; CHECK-NEXT: br label [[FOR_COND1]] 19 ; 20 entry: 21 br i1 false, label %for.cond1, label %for.inc 22 23 for.cond1: 24 %e.0 = phi i16* [ %e.1, %for.inc ], [ null, %entry ] 25 %0 = load i16, i16* %e.0, align 2 26 %add = add i16 %0, 0 27 store i16 %add, i16* %e.0, align 2 28 br label %for.inc 29 30 for.inc: 31 %e.1 = phi i16* [ %e.0, %for.cond1 ], [ @b, %entry ] 32 %1 = load i16, i16* @b, align 2 33 %inc = add i16 %1, 1 34 store i16 %inc, i16* @b, align 2 35 br label %for.cond1 36 } 37