mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
602a9cd084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245920 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
527 B
LLVM
22 lines
527 B
LLVM
; RUN: opt -S -globalopt < %s | FileCheck %s
|
|
|
|
; CHECK: @tmp = global i32 42
|
|
|
|
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
|
|
@tmp = global i32 0
|
|
|
|
define i32 @TheAnswerToLifeTheUniverseAndEverything() {
|
|
ret i32 42
|
|
}
|
|
|
|
define void @_GLOBAL__I_a() {
|
|
enter:
|
|
%tmp1 = call i32 @TheAnswerToLifeTheUniverseAndEverything()
|
|
store i32 %tmp1, i32* @tmp
|
|
%cmp = icmp eq i32 %tmp1, 42
|
|
call void @llvm.assume(i1 %cmp)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.assume(i1)
|