summaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG/assume.ll
blob: 1d1b96a58edfbf44c9ab10bee0c22f41c75f629f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: opt -simplifycfg -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