<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0 elementToProof">I don't see how the printf change is relevant here,
 but you ended up reproducing part of </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0"><a href="https://reviews.llvm.org/D140560" id="LPlnkOWALinkPreview">https://reviews.llvm.org/D140560</a>
 which should be separate<br>
</span></div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9yZXZpZXdzLmxsdm0ub3JnL0QxNDA1NjA." class="LPBorder764312" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer764312" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td style="width: 100%;">
<div id="LPTitle764312" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor764312" href="https://reviews.llvm.org/D140560" style="text-decoration: none; color: var(--themePrimary);">AMDGPU: Fix broken opaque pointer handling in printf pass</a></div>
<div id="LPDescription764312" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
AMDGPU: Fix broken opaque pointer handling in printf pass. Needs Review Public. Actions</div>
<div id="LPMetadata764312" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
reviews.llvm.org</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> llvm-commits <llvm-commits-bounces@lists.llvm.org> on behalf of Ron Lieberman via llvm-commits <llvm-commits@lists.llvm.org><br>
<b>Sent:</b> Tuesday, January 3, 2023 12:04 PM<br>
<b>To:</b> llvm-commits@lists.llvm.org <llvm-commits@lists.llvm.org><br>
<b>Subject:</b> [llvm] 135f6a1 - [libomptarget][plugin-nextgen] fix for [TypePromotion] NewPM support.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.<br>
<br>
<br>
Author: Ron Lieberman<br>
Date: 2023-01-03T11:04:13-06:00<br>
New Revision: 135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4<br>
<br>
URL: <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fcommit%2F135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4&data=05%7C01%7CMatthew.Arsenault%40amd.com%7Cf1de6b81a1554d6d75b008daedac9861%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638083622816213549%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MV5lxKqJ1JHzqeJeSv%2F9bIHIBcj%2BtLGxryhc0jbX8tE%3D&reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fcommit%2F135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4&data=05%7C01%7CMatthew.Arsenault%40amd.com%7Cf1de6b81a1554d6d75b008daedac9861%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638083622816213549%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MV5lxKqJ1JHzqeJeSv%2F9bIHIBcj%2BtLGxryhc0jbX8tE%3D&reserved=0</a><br>
DIFF: <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fcommit%2F135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4.diff&data=05%7C01%7CMatthew.Arsenault%40amd.com%7Cf1de6b81a1554d6d75b008daedac9861%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638083622816369766%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IBGljw9a700Pb%2BEKz6YOAM9MGbwnDpyO7JW8V5nH8AM%3D&reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-project%2Fcommit%2F135f6a1ee8b20bb392ebad2fa5aef78e3a30ddb4.diff&data=05%7C01%7CMatthew.Arsenault%40amd.com%7Cf1de6b81a1554d6d75b008daedac9861%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638083622816369766%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IBGljw9a700Pb%2BEKz6YOAM9MGbwnDpyO7JW8V5nH8AM%3D&reserved=0</a><br>
<br>
LOG: [libomptarget][plugin-nextgen] fix for  [TypePromotion] NewPM support.<br>
<br>
Added:<br>
<br>
<br>
Modified:<br>
    llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp<br>
    openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp<br>
<br>
Removed:<br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp<br>
index 92fd7bc87716a..2775d0621b10e 100644<br>
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp<br>
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp<br>
@@ -133,16 +133,7 @@ void AMDGPUPrintfRuntimeBindingImpl::getConversionSpecifiers(<br>
<br>
 bool AMDGPUPrintfRuntimeBindingImpl::shouldPrintAsStr(char Specifier,<br>
                                                       Type *OpType) const {<br>
-  if (Specifier != 's')<br>
-    return false;<br>
-  const PointerType *PT = dyn_cast<PointerType>(OpType);<br>
-  if (!PT || PT->getAddressSpace() != AMDGPUAS::CONSTANT_ADDRESS)<br>
-    return false;<br>
-  Type *ElemType = PT->getContainedType(0);<br>
-  if (ElemType->getTypeID() != Type::IntegerTyID)<br>
-    return false;<br>
-  IntegerType *ElemIType = cast<IntegerType>(ElemType);<br>
-  return ElemIType->getBitWidth() == 8;<br>
+  return Specifier == 's' && isa<PointerType>(OpType);<br>
 }<br>
<br>
 bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {<br>
<br>
diff  --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp<br>
index 7cc1bb88cd004..893f4b17f3921 100644<br>
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp<br>
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp<br>
@@ -107,7 +107,7 @@ void init(Triple TT) {<br>
   initializeWasmEHPreparePass(Registry);<br>
   initializeWriteBitcodePassPass(Registry);<br>
   initializeHardwareLoopsPass(Registry);<br>
-  initializeTypePromotionPass(Registry);<br>
+  initializeTypePromotionLegacyPass(Registry);<br>
   initializeReplaceWithVeclibLegacyPass(Registry);<br>
   initializeJMCInstrumenterPass(Registry);<br>
 }<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
llvm-commits@lists.llvm.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-commits&data=05%7C01%7CMatthew.Arsenault%40amd.com%7Cf1de6b81a1554d6d75b008daedac9861%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638083622816369766%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uDvs5ii5Ki82Hpk0elbCGAS1hvLrQNw3%2BuddpO00i1U%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-commits&data=05%7C01%7CMatthew.Arsenault%40amd.com%7Cf1de6b81a1554d6d75b008daedac9861%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638083622816369766%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uDvs5ii5Ki82Hpk0elbCGAS1hvLrQNw3%2BuddpO00i1U%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>