1 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
3 ; CHECK-SPIRV-NOT: OpCapability ExpectAssumeKHR
4 ; CHECK-SPIRV-NOT: OpExtension "SPV_KHR_expect_assume"
5 ; CHECK-SPIRV: OpName %[[#COMPARE:]] "cmp"
6 ; CHECK-SPIRV: %[[#COMPARE]] = OpINotEqual %[[#]] %[[#]] %[[#]]
7 ; CHECK-SPIRV-NOT: OpAssumeTrueKHR %[[#COMPARE]]
9 %class.anon = type { i8 }
11 define spir_func void @_Z3fooi(i32 %x) {
13 %x.addr = alloca i32, align 4
14 store i32 %x, i32* %x.addr, align 4
15 %0 = load i32, i32* %x.addr, align 4
16 %cmp = icmp ne i32 %0, 0
17 call void @llvm.assume(i1 %cmp)
21 declare void @llvm.assume(i1)
25 %retval = alloca i32, align 4
26 %agg.tmp = alloca %class.anon, align 1
27 store i32 0, i32* %retval, align 4
28 call spir_func void @"_Z18kernel_single_taskIZ4mainE11fake_kernelZ4mainE3$_0EvT0_"(%class.anon* byval(%class.anon) align 1 %agg.tmp)
32 define internal spir_func void @"_Z18kernel_single_taskIZ4mainE11fake_kernelZ4mainE3$_0EvT0_"(%class.anon* byval(%class.anon) align 1 %kernelFunc) {
34 call spir_func void @"_ZZ4mainENK3$_0clEv"(%class.anon* %kernelFunc)
38 define internal spir_func void @"_ZZ4mainENK3$_0clEv"(%class.anon* %this) align 2 {
40 %this.addr = alloca %class.anon*, align 8
41 %a = alloca i32, align 4
42 store %class.anon* %this, %class.anon** %this.addr, align 8
43 %this1 = load %class.anon*, %class.anon** %this.addr, align 8
44 %0 = bitcast i32* %a to i8*
45 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0)
46 store i32 1, i32* %a, align 4
47 %1 = load i32, i32* %a, align 4
48 call spir_func void @_Z3fooi(i32 %1)
49 %2 = bitcast i32* %a to i8*
50 call void @llvm.lifetime.end.p0i8(i64 4, i8* %2)
54 declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
56 declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)