diff --git a/include/LLVMSPIRVExtensions.inc b/include/LLVMSPIRVExtensions.inc index eb395cc19c..aba676968d 100644 --- a/include/LLVMSPIRVExtensions.inc +++ b/include/LLVMSPIRVExtensions.inc @@ -51,8 +51,8 @@ EXT(SPV_INTEL_bfloat16_conversion) EXT(SPV_INTEL_joint_matrix) EXT(SPV_INTEL_hw_thread_queries) EXT(SPV_INTEL_global_variable_decorations) -EXT(SPV_INTEL_non_constant_addrspace_printf) EXT(SPV_INTEL_complex_float_mul_div) EXT(SPV_INTEL_split_barrier) EXT(SPV_INTEL_masked_gather_scatter) EXT(SPV_INTEL_tensor_float32_conversion) +EXT(SPV_EXT_relaxed_printf_string_address_space) diff --git a/lib/SPIRV/SPIRVWriter.cpp b/lib/SPIRV/SPIRVWriter.cpp index fc238ef23a..a8213e8ee4 100644 --- a/lib/SPIRV/SPIRVWriter.cpp +++ b/lib/SPIRV/SPIRVWriter.cpp @@ -3995,17 +3995,17 @@ SPIRVValue *LLVMToSPIRVBase::transDirectCallInst(CallInst *CI, if (FormatStrPtr->getAddressSpace() != SPIR::TypeAttributeEnum::ATTR_CONST) { if (!BM->isAllowedToUseExtension( - ExtensionID::SPV_INTEL_non_constant_addrspace_printf)) { + ExtensionID::SPV_EXT_relaxed_printf_string_address_space)) { std::string ErrorStr = - "The SPV_INTEL_non_constant_addrspace_printf extension should be " - "allowed to translate this module, because this LLVM module " - "contains the printf function with format string, whose address " - "space is not equal to 2 (constant)."; + "Either SPV_EXT_relaxed_printf_string_address_space extension " + "should be allowed to translate this module, because this LLVM " + "module contains the printf function with format string, whose " + "address space is not equal to 2 (constant)."; getErrorLog().checkError(false, SPIRVEC_RequiresExtension, CI, ErrorStr); } - BM->addExtension(ExtensionID::SPV_INTEL_non_constant_addrspace_printf); - BM->addCapability(internal::CapabilityNonConstantAddrspacePrintfINTEL); + BM->addExtension( + ExtensionID::SPV_EXT_relaxed_printf_string_address_space); } } diff --git a/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h b/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h index 219bedf50a..cc31510b08 100644 --- a/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h +++ b/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h @@ -614,8 +614,6 @@ template <> inline void SPIRVMap::init() { add(internal::CapabilityHWThreadQueryINTEL, "HWThreadQueryINTEL"); add(internal::CapabilityGlobalVariableDecorationsINTEL, "GlobalVariableDecorationsINTEL"); - add(internal::CapabilityNonConstantAddrspacePrintfINTEL, - "NonConstantAddrspacePrintfINTEL"); add(internal::CapabilityComplexFloatMulDivINTEL, "ComplexFloatMulDivINTEL"); add(internal::CapabilityMaskedGatherScatterINTEL, "MaskedGatherScatterINTEL"); add(internal::CapabilityTensorFloat32ConversionINTEL, diff --git a/lib/SPIRV/libSPIRV/spirv_internal.hpp b/lib/SPIRV/libSPIRV/spirv_internal.hpp index 67d68a13f3..2002febca9 100644 --- a/lib/SPIRV/libSPIRV/spirv_internal.hpp +++ b/lib/SPIRV/libSPIRV/spirv_internal.hpp @@ -78,7 +78,6 @@ enum InternalCapability { ICapabilityHWThreadQueryINTEL = 6134, ICapFPArithmeticFenceINTEL = 6144, ICapGlobalVariableDecorationsINTEL = 6146, - ICapabilityNonConstantAddrspacePrintfINTEL = 6411, ICapabilityComplexFloatMulDivINTEL = 6414, ICapabilityTensorFloat32ConversionINTEL = 6425, ICapabilityMaskedGatherScatterINTEL = 6427 @@ -121,8 +120,6 @@ _SPIRV_OP(Capability, HWThreadQueryINTEL) _SPIRV_OP(BuiltIn, SubDeviceIDINTEL) _SPIRV_OP(BuiltIn, GlobalHWThreadIDINTEL) -_SPIRV_OP(Capability, NonConstantAddrspacePrintfINTEL) - _SPIRV_OP(Capability, ComplexFloatMulDivINTEL) _SPIRV_OP(Op, ComplexFMulINTEL) _SPIRV_OP(Op, ComplexFDivINTEL) diff --git a/test/transcoding/SPV_INTEL_non_constant_addrspace_printf/non-constant-printf.ll b/test/transcoding/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll similarity index 93% rename from test/transcoding/SPV_INTEL_non_constant_addrspace_printf/non-constant-printf.ll rename to test/transcoding/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll index 6d8ae4ebe6..bfaf700bca 100644 --- a/test/transcoding/SPV_INTEL_non_constant_addrspace_printf/non-constant-printf.ll +++ b/test/transcoding/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll @@ -1,7 +1,7 @@ ; RUN: llvm-as %s -o %t.bc ; RUN: not llvm-spirv %t.bc -o %t.spv 2>&1 | FileCheck %s --check-prefix=CHECK-WO-EXT -; RUN: llvm-spirv -spirv-text %t.bc -o %t.spt --spirv-ext=+SPV_INTEL_non_constant_addrspace_printf +; RUN: llvm-spirv -spirv-text %t.bc -o %t.spt --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space ; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV ; RUN: llvm-spirv -to-binary %t.spt -o %t.spv @@ -10,10 +10,9 @@ ; RUN: FileCheck < %t.rev.ll %s --check-prefix=CHECK-LLVM ; CHECK-WO-EXT: RequiresExtension: Feature requires the following SPIR-V extension: -; CHECK-WO-EXT: The SPV_INTEL_non_constant_addrspace_printf extension should be allowed to translate this module, because this LLVM module contains the printf function with format string, whose address space is not equal to 2 (constant). +; CHECK-WO-EXT: SPV_EXT_relaxed_printf_string_address_space extension should be allowed to translate this module, because this LLVM module contains the printf function with format string, whose address space is not equal to 2 (constant). -; CHECK-SPIRV: Capability NonConstantAddrspacePrintfINTEL -; CHECK-SPIRV: Extension "SPV_INTEL_non_constant_addrspace_printf" +; CHECK-SPIRV: Extension "SPV_EXT_relaxed_printf_string_address_space" ; CHECK-SPIRV: ExtInstImport [[#ExtInstSetId:]] "OpenCL.std" ; CHECK-SPIRV: TypeInt [[#TypeInt8Id:]] 8 0 ; CHECK-SPIRV: TypeInt [[#TypeInt32Id:]] 32 0