Xamarin Public Jenkins (auto-signing) 8625704ad8 Imported Upstream version 5.18.0.179
Former-commit-id: 67aa10e65b237e1c4537630979ee99ebe1374215
2018-10-25 08:34:57 +00:00

21 lines
827 B
LLVM

; RUN: opt -S -gvn-hoist -verify-memoryssa -newgvn < %s | FileCheck %s
; Check that we end up with one load and one store, in the right order
; CHECK-LABEL: define void @test_it(
; CHECK: store
; CHECK-NOT: store
; CHECK-NOT: load
%rec894.0.1.2.3.12 = type { i16 }
@a = external global %rec894.0.1.2.3.12
define void @test_it() {
bb2:
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
%_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
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
%_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
ret void
}