diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_two_calls.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_two_calls.ll index c5a2918f92c29e8..eb7b1dffaee501e 100644 --- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_two_calls.ll +++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_two_calls.ll @@ -5,27 +5,30 @@ ; CHECK-DAG: OpCapability FunctionPointersINTEL ; CHECK-DAG: OpCapability Int64 ; CHECK: OpExtension "SPV_INTEL_function_pointers" -; CHECK-DAG: %[[TyInt8:.*]] = OpTypeInt 8 0 + +; CHECK-DAG: OpName %[[fp:.*]] "fp" +; CHECK-DAG: OpName %[[data:.*]] "data" +; CHECK-DAG: OpName %[[bar:.*]] "bar" +; CHECK-DAG: OpName %[[test:.*]] "test" ; CHECK-DAG: %[[TyVoid:.*]] = OpTypeVoid ; CHECK-DAG: %[[TyFloat32:.*]] = OpTypeFloat 32 +; CHECK-DAG: %[[TyInt8:.*]] = OpTypeInt 8 0 ; CHECK-DAG: %[[TyInt64:.*]] = OpTypeInt 64 0 ; CHECK-DAG: %[[TyPtrInt8:.*]] = OpTypePointer Function %[[TyInt8]] -; CHECK-DAG: %[[TyFunFp:.*]] = OpTypeFunction %[[TyFloat32]] %[[TyPtrInt8]] -; CHECK-DAG: %[[TyFunBar:.*]] = OpTypeFunction %[[TyInt64]] %[[TyPtrInt8]] %[[TyPtrInt8]] -; CHECK-DAG: %[[TyPtrFunFp:.*]] = OpTypePointer Function %[[TyFunFp]] -; CHECK-DAG: %[[TyPtrFunBar:.*]] = OpTypePointer Function %[[TyFunBar]] -; CHECK-DAG: %[[TyFunTest:.*]] = OpTypeFunction %[[TyVoid]] %[[TyPtrInt8]] %[[TyPtrInt8]] %[[TyPtrInt8]] -; CHECK: %[[FunTest:.*]] = OpFunction %[[TyVoid]] None %[[TyFunTest]] -; CHECK: %[[ArgFp:.*]] = OpFunctionParameter %[[TyPtrInt8]] -; CHECK: %[[ArgData:.*]] = OpFunctionParameter %[[TyPtrInt8]] -; CHECK: %[[ArgBar:.*]] = OpFunctionParameter %[[TyPtrInt8]] -; CHECK: OpFunctionPointerCallINTEL %[[TyFloat32]] %[[ArgFp]] %[[ArgBar]] -; CHECK: OpFunctionPointerCallINTEL %[[TyInt64]] %[[ArgBar]] %[[ArgFp]] %[[ArgData]] +; CHECK-DAG: %[[TyFp:.*]] = OpTypeFunction %[[TyFloat32]] %[[TyPtrInt8]] +; CHECK-DAG: %[[TyPtrFp:.*]] = OpTypePointer Function %[[TyFp]] +; CHECK-DAG: %[[TyBar:.*]] = OpTypeFunction %[[TyInt64]] %[[TyPtrFp]] %[[TyPtrInt8]] +; CHECK-DAG: %[[TyPtrBar:.*]] = OpTypePointer Function %[[TyBar]] +; CHECK-DAG: %[[TyTest:.*]] = OpTypeFunction %[[TyVoid]] %[[TyPtrFp]] %[[TyPtrInt8]] %[[TyPtrBar]] +; CHECK: %[[test]] = OpFunction %[[TyVoid]] None %[[TyTest]] +; CHECK: %[[fp]] = OpFunctionParameter %[[TyPtrFp]] +; CHECK: %[[data]] = OpFunctionParameter %[[TyPtrInt8]] +; CHECK: %[[bar]] = OpFunctionParameter %[[TyPtrBar]] +; CHECK: OpFunctionPointerCallINTEL %[[TyFloat32]] %[[fp]] %[[bar]] +; CHECK: OpFunctionPointerCallINTEL %[[TyInt64]] %[[bar]] %[[fp]] %[[data]] ; CHECK: OpReturn ; CHECK: OpFunctionEnd -target triple = "spir64-unknown-unknown" - define spir_kernel void @test(ptr %fp, ptr %data, ptr %bar) { entry: %0 = call spir_func float %fp(ptr %bar)