From: Ron Lieberman Date: Tue, 3 Jan 2023 17:04:13 +0000 (-0600) Subject: [libomptarget][plugin-nextgen] fix for [TypePromotion] NewPM support. X-Git-Tag: upstream/17.0.6~22276 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4;p=platform%2Fupstream%2Fllvm.git [libomptarget][plugin-nextgen] fix for [TypePromotion] NewPM support. --- diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp index 92fd7bc..2775d06 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp @@ -133,16 +133,7 @@ void AMDGPUPrintfRuntimeBindingImpl::getConversionSpecifiers( bool AMDGPUPrintfRuntimeBindingImpl::shouldPrintAsStr(char Specifier, Type *OpType) const { - if (Specifier != 's') - return false; - const PointerType *PT = dyn_cast(OpType); - if (!PT || PT->getAddressSpace() != AMDGPUAS::CONSTANT_ADDRESS) - return false; - Type *ElemType = PT->getContainedType(0); - if (ElemType->getTypeID() != Type::IntegerTyID) - return false; - IntegerType *ElemIType = cast(ElemType); - return ElemIType->getBitWidth() == 8; + return Specifier == 's' && isa(OpType); } bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) { diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp index 7cc1bb8..893f4b1 100644 --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp @@ -107,7 +107,7 @@ void init(Triple TT) { initializeWasmEHPreparePass(Registry); initializeWriteBitcodePassPass(Registry); initializeHardwareLoopsPass(Registry); - initializeTypePromotionPass(Registry); + initializeTypePromotionLegacyPass(Registry); initializeReplaceWithVeclibLegacyPass(Registry); initializeJMCInstrumenterPass(Registry); }