1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -basic-aa -newgvn -S | FileCheck %s
4 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
6 define void @patatino(i8* %blah) {
7 ; CHECK-LABEL: @patatino(
9 ; CHECK-NEXT: br label [[WHILE_COND:%.*]]
11 ; CHECK-NEXT: [[MEH:%.*]] = phi i8* [ [[BLAH:%.*]], [[ENTRY:%.*]] ], [ null, [[WHILE_BODY:%.*]] ]
12 ; CHECK-NEXT: switch i32 undef, label [[WHILE_BODY]] [
13 ; CHECK-NEXT: i32 666, label [[WHILE_END:%.*]]
16 ; CHECK-NEXT: br label [[WHILE_COND]]
18 ; CHECK-NEXT: store i8 0, i8* [[MEH]], align 1
19 ; CHECK-NEXT: store i8 0, i8* [[BLAH]], align 1
20 ; CHECK-NEXT: ret void
26 %meh = phi i8* [ %blah, %entry ], [ null, %while.body ]
27 switch i32 undef, label %while.body [
28 i32 666, label %while.end
35 ;; These two stores will initially be considered equivalent, but then proven not.
36 ;; the second store would previously end up deciding it's equivalent to a previous
37 ;; store, but it was really just finding an optimistic version of itself
38 ;; in the congruence class.
39 store i8 0, i8* %meh, align 1
40 store i8 0, i8* %blah, align 1