xref: /llvm-project/llvm/test/Transforms/GVNHoist/hoist-pr28933.ll (revision 055fb7795aa219a3d274d280ec9129784f169f56)
1; RUN: opt -S -passes=gvn-hoist,newgvn -verify-memoryssa < %s | FileCheck %s
2
3; Check that we end up with one load and one store, in the right order
4; CHECK-LABEL:  define void @test_it(
5; CHECK: store
6; CHECK-NOT: store
7; CHECK-NOT: load
8
9%rec894.0.1.2.3.12 = type { i16 }
10
11@a = external global %rec894.0.1.2.3.12
12
13define void @test_it() {
14bb2:
15  store i16 undef, ptr @a, align 1
16  %_tmp61 = load i16, ptr @a, align 1
17  store i16 undef, ptr @a, align 1
18  %_tmp92 = load i16, ptr @a, align 1
19  ret void
20}
21