1 ; RUN: opt -S -gvn-hoist -verify-memoryssa -newgvn < %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 13 define void @test_it() { 14 bb2: 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 19 ret void 20 } 21