llvm-for-llvmta/test/Transforms/SimplifyCFG/assume.ll

23 lines
434 B
LLVM
Raw Normal View History

2022-04-25 10:02:23 +02:00
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
define void @test1() {
call void @llvm.assume(i1 0)
ret void
; CHECK-LABEL: @test1
; CHECK-NOT: llvm.assume
; CHECK: unreachable
}
define void @test2() {
call void @llvm.assume(i1 undef)
ret void
; CHECK-LABEL: @test2
; CHECK-NOT: llvm.assume
; CHECK: unreachable
}
declare void @llvm.assume(i1) nounwind