You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
@ -1,37 +0,0 @@
|
||||
; RUN: opt < %s -S -globalopt | FileCheck %s
|
||||
|
||||
; This global is externally_initialized, which may modify the value between
|
||||
; it's static initializer and any code in this module being run, so the only
|
||||
; write to it cannot be merged into the static initialiser.
|
||||
; CHECK: @a = internal unnamed_addr externally_initialized global i32 undef
|
||||
@a = internal externally_initialized global i32 undef
|
||||
|
||||
; This global is stored to by the external initialization, so cannot be
|
||||
; constant-propagated and removed, despite the fact that there are no writes
|
||||
; to it.
|
||||
; CHECK: @b = internal unnamed_addr externally_initialized global i32 undef
|
||||
@b = internal externally_initialized global i32 undef
|
||||
|
||||
|
||||
define void @foo() {
|
||||
; CHECK-LABEL: foo
|
||||
entry:
|
||||
; CHECK: store i32 42, i32* @a
|
||||
store i32 42, i32* @a
|
||||
ret void
|
||||
}
|
||||
define i32 @bar() {
|
||||
; CHECK-LABEL: bar
|
||||
entry:
|
||||
; CHECK: %val = load i32, i32* @a
|
||||
%val = load i32, i32* @a
|
||||
ret i32 %val
|
||||
}
|
||||
|
||||
define i32 @baz() {
|
||||
; CHECK-LABEL: baz
|
||||
entry:
|
||||
; CHECK: %val = load i32, i32* @b
|
||||
%val = load i32, i32* @b
|
||||
ret i32 %val
|
||||
}
|
Reference in New Issue
Block a user