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
6 define void @patatino() {
7 ; CHECK-LABEL: @patatino(
9 ; CHECK-NEXT: br i1 false, label [[FOR_COND1:%.*]], label [[FOR_INC:%.*]]
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]]
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]]
21 br i1 false, label %for.cond1, label %for.inc
24 %e.0 = phi i16* [ %e.1, %for.inc ], [ null, %entry ]
25 %0 = load i16, i16* %e.0, align 2
27 store i16 %add, i16* %e.0, align 2
31 %e.1 = phi i16* [ %e.0, %for.cond1 ], [ @b, %entry ]
32 %1 = load i16, i16* @b, align 2
34 store i16 %inc, i16* @b, align 2