Skip to content

Commit 99c391b

Browse files
wenju-hesys-ce-bb
authored andcommitted
Add ret type to convert-SampledImage builtin name (#2576)
Similar as ConvertHandleToImageINTEL, ConvertHandleToSampledImageINTEL builtin may have the same argument type but different return types. So we need to add ret type as name suffix when translating to LLVM IR. Original commit: KhronosGroup/SPIRV-LLVM-Translator@04972917552b08e
1 parent 0a85efc commit 99c391b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

llvm-spirv/lib/SPIRV/SPIRVReader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3363,6 +3363,7 @@ Instruction *SPIRVToLLVM::transSPIRVBuiltinFromInst(SPIRVInstruction *BI,
33633363
case internal::OpCooperativeMatrixLoadCheckedINTEL:
33643364
case internal::OpTaskSequenceCreateINTEL:
33653365
case internal::OpConvertHandleToImageINTEL:
3366+
case internal::OpConvertHandleToSampledImageINTEL:
33663367
AddRetTypePostfix = true;
33673368
break;
33683369
default: {

llvm-spirv/test/extensions/INTEL/SPV_INTEL_bindless_images/bindless_images_generic.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ target triple = "spir64-unknown-unknown"
3030

3131
; CHECK-LLVM: call spir_func target("spirv.Image", i64, 2, 0, 0, 0, 0, 0, 0) @_Z76__spirv_ConvertHandleToImageINTEL_RPU3AS133__spirv_Image__long_2_0_0_0_0_0_0m(i64 %{{.*}})
3232
; CHECK-LLVM: call spir_func target("spirv.Sampler") @_Z35__spirv_ConvertHandleToSamplerINTELm(i64 42)
33-
; CHECK-LLVM: call spir_func target("spirv.SampledImage", i64, 1, 0, 0, 0, 0, 0, 0) @_Z40__spirv_ConvertHandleToSampledImageINTELm(i64 43)
33+
; CHECK-LLVM: call spir_func target("spirv.SampledImage", i64, 1, 0, 0, 0, 0, 0, 0) @_Z90__spirv_ConvertHandleToSampledImageINTEL_RPU3AS140__spirv_SampledImage__long_1_0_0_0_0_0_0m(i64 43)
3434

3535
define spir_func void @foo(i64 %in) {
3636
%img = call spir_func target("spirv.Image", i64, 2, 0, 0, 0, 0, 0, 0) @_Z33__spirv_ConvertHandleToImageINTELl(i64 %in)

0 commit comments

Comments
 (0)