1 ; RUN: opt -S -gvn-hoist < %s | FileCheck %s
3 ; Make sure the two stores @B do not get hoisted past the load @B.
5 ; CHECK-LABEL: define i8* @Foo
11 @A = external global i8
12 @B = external global i8*
16 br i1 undef, label %if.then, label %if.else
19 store i8* null, i8** @B
23 %1 = load i8*, i8** @B
24 store i8* null, i8** @B
28 ; Make sure the two stores @B do not get hoisted past the store @GlobalVar.
30 ; CHECK-LABEL: define i8* @Fun
37 @GlobalVar = internal global i8 0
41 br i1 undef, label %if.then, label %if.else
44 store i8* null, i8** @B
48 store i8 0, i8* @GlobalVar
49 store i8* null, i8** @B
50 %1 = load i8*, i8** @B