[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / CodeGen / SPIRV / assume.ll
blob6099955e4afb4ef11c9d155c7a5f0a11873d126f
1 ; RUN: llc -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
2 ; RUN: llc -mtriple=spirv64-unknown-unknown --spirv-extensions=SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
3 ; RUN: llc -mtriple=spirv32-unknown-unknown < %s | FileCheck --check-prefixes=NOEXT,CHECK %s
4 ; RUN: llc -mtriple=spirv64-unknown-unknown < %s | FileCheck --check-prefixes=NOEXT,CHECK %s
6 ; EXT:        OpCapability ExpectAssumeKHR
7 ; EXT-NEXT:   OpExtension "SPV_KHR_expect_assume"
8 ; NOEXT-NOT:  OpCapability ExpectAssumeKHR
9 ; NOEXT-NOT:  OpExtension "SPV_KHR_expect_assume"
11 declare void @llvm.assume(i1)
13 ; CHECK-DAG:  %8 = OpIEqual %3 %5 %6
14 ; EXT:        OpAssumeTrueKHR %8
15 ; NOEXT-NOT:  OpAssumeTrueKHR %8
16 define i1 @assumeeq(i32 %x, i32 %y) {
17     %cmp = icmp eq i32 %x, %y
18     call void @llvm.assume(i1 %cmp)
19     ret i1 %cmp