1 ; RUN: opt -S -gvn-hoist -verify-memoryssa -newgvn < %s | FileCheck %s
3 ; Check that we end up with one load and one store, in the right order
4 ; CHECK-LABEL: define void @test_it(
9 %rec894.0.1.2.3.12 = type { i16 }
11 @a = external global %rec894.0.1.2.3.12
13 define void @test_it() {
15 store i16 undef, i16* getelementptr inbounds (%rec894.0.1.2.3.12, %rec894.0.1.2.3.12* @a, i16 0, i32 0), align 1
16 %_tmp61 = load i16, i16* getelementptr inbounds (%rec894.0.1.2.3.12, %rec894.0.1.2.3.12* @a, i16 0, i32 0), align 1
17 store i16 undef, i16* getelementptr inbounds (%rec894.0.1.2.3.12, %rec894.0.1.2.3.12* @a, i16 0, i32 0), align 1
18 %_tmp92 = load i16, i16* getelementptr inbounds (%rec894.0.1.2.3.12, %rec894.0.1.2.3.12* @a, i16 0, i32 0), align 1