Skip to content

Commit db9f367

Browse files
update test case
1 parent bd9bcea commit db9f367

File tree

1 file changed

+17
-14
lines changed
  • llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers

1 file changed

+17
-14
lines changed

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_two_calls.ll

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,30 @@
55
; CHECK-DAG: OpCapability FunctionPointersINTEL
66
; CHECK-DAG: OpCapability Int64
77
; CHECK: OpExtension "SPV_INTEL_function_pointers"
8-
; CHECK-DAG: %[[TyInt8:.*]] = OpTypeInt 8 0
8+
9+
; CHECK-DAG: OpName %[[fp:.*]] "fp"
10+
; CHECK-DAG: OpName %[[data:.*]] "data"
11+
; CHECK-DAG: OpName %[[bar:.*]] "bar"
12+
; CHECK-DAG: OpName %[[test:.*]] "test"
913
; CHECK-DAG: %[[TyVoid:.*]] = OpTypeVoid
1014
; CHECK-DAG: %[[TyFloat32:.*]] = OpTypeFloat 32
15+
; CHECK-DAG: %[[TyInt8:.*]] = OpTypeInt 8 0
1116
; CHECK-DAG: %[[TyInt64:.*]] = OpTypeInt 64 0
1217
; CHECK-DAG: %[[TyPtrInt8:.*]] = OpTypePointer Function %[[TyInt8]]
13-
; CHECK-DAG: %[[TyFunFp:.*]] = OpTypeFunction %[[TyFloat32]] %[[TyPtrInt8]]
14-
; CHECK-DAG: %[[TyFunBar:.*]] = OpTypeFunction %[[TyInt64]] %[[TyPtrInt8]] %[[TyPtrInt8]]
15-
; CHECK-DAG: %[[TyPtrFunFp:.*]] = OpTypePointer Function %[[TyFunFp]]
16-
; CHECK-DAG: %[[TyPtrFunBar:.*]] = OpTypePointer Function %[[TyFunBar]]
17-
; CHECK-DAG: %[[TyFunTest:.*]] = OpTypeFunction %[[TyVoid]] %[[TyPtrInt8]] %[[TyPtrInt8]] %[[TyPtrInt8]]
18-
; CHECK: %[[FunTest:.*]] = OpFunction %[[TyVoid]] None %[[TyFunTest]]
19-
; CHECK: %[[ArgFp:.*]] = OpFunctionParameter %[[TyPtrInt8]]
20-
; CHECK: %[[ArgData:.*]] = OpFunctionParameter %[[TyPtrInt8]]
21-
; CHECK: %[[ArgBar:.*]] = OpFunctionParameter %[[TyPtrInt8]]
22-
; CHECK: OpFunctionPointerCallINTEL %[[TyFloat32]] %[[ArgFp]] %[[ArgBar]]
23-
; CHECK: OpFunctionPointerCallINTEL %[[TyInt64]] %[[ArgBar]] %[[ArgFp]] %[[ArgData]]
18+
; CHECK-DAG: %[[TyFp:.*]] = OpTypeFunction %[[TyFloat32]] %[[TyPtrInt8]]
19+
; CHECK-DAG: %[[TyPtrFp:.*]] = OpTypePointer Function %[[TyFp]]
20+
; CHECK-DAG: %[[TyBar:.*]] = OpTypeFunction %[[TyInt64]] %[[TyPtrFp]] %[[TyPtrInt8]]
21+
; CHECK-DAG: %[[TyPtrBar:.*]] = OpTypePointer Function %[[TyBar]]
22+
; CHECK-DAG: %[[TyTest:.*]] = OpTypeFunction %[[TyVoid]] %[[TyPtrFp]] %[[TyPtrInt8]] %[[TyPtrBar]]
23+
; CHECK: %[[test]] = OpFunction %[[TyVoid]] None %[[TyTest]]
24+
; CHECK: %[[fp]] = OpFunctionParameter %[[TyPtrFp]]
25+
; CHECK: %[[data]] = OpFunctionParameter %[[TyPtrInt8]]
26+
; CHECK: %[[bar]] = OpFunctionParameter %[[TyPtrBar]]
27+
; CHECK: OpFunctionPointerCallINTEL %[[TyFloat32]] %[[fp]] %[[bar]]
28+
; CHECK: OpFunctionPointerCallINTEL %[[TyInt64]] %[[bar]] %[[fp]] %[[data]]
2429
; CHECK: OpReturn
2530
; CHECK: OpFunctionEnd
2631

27-
target triple = "spir64-unknown-unknown"
28-
2932
define spir_kernel void @test(ptr %fp, ptr %data, ptr %bar) {
3033
entry:
3134
%0 = call spir_func float %fp(ptr %bar)

0 commit comments

Comments
 (0)