llvm/test/Transforms/GlobalOpt/assume.ll
Piotr Padlewski 602a9cd084 assume.ll test fixup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245920 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-25 01:48:49 +00:00

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)