[clang] [llvm] AMDGPU: Fix libcall recognition of image array types (PR #119832)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 15 22:02:55 PST 2024


================
@@ -622,9 +622,9 @@ bool ItaniumParamParser::parseItaniumParam(StringRef& param,
   if (isDigit(TC)) {
     res.ArgType =
         StringSwitch<AMDGPULibFunc::EType>(eatLengthPrefixedName(param))
-            .Case("ocl_image1darray", AMDGPULibFunc::IMG1DA)
-            .Case("ocl_image1dbuffer", AMDGPULibFunc::IMG1DB)
-            .Case("ocl_image2darray", AMDGPULibFunc::IMG2DA)
+            .StartsWith("ocl_image1d_array", AMDGPULibFunc::IMG1DA)
+            .StartsWith("ocl_image1d_buffer", AMDGPULibFunc::IMG1DB)
+            .StartsWith("ocl_image2d_array", AMDGPULibFunc::IMG2DA)
----------------
arsenm wrote:

I'm not sure that does anything today. I don't think we actually have any transforms on these image cases. Either way, that code is more broken since it already isn't refining the ro/wo/rw type variants 

https://github.com/llvm/llvm-project/pull/119832


More information about the llvm-commits mailing list