1 ; RUN: llc -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
2 ; RUN: llc -mtriple=spirv64-unknown-unknown --spirv-ext=+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)