[llvm] AMDGPU: Verify function type matches when matching libcalls (PR #119043)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 08:00:25 PST 2024
================
@@ -620,17 +620,17 @@ bool ItaniumParamParser::parseItaniumParam(StringRef& param,
// parse type
char const TC = param.front();
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)
- .Case("ocl_image1d" , AMDGPULibFunc::IMG1D)
- .Case("ocl_image2d" , AMDGPULibFunc::IMG2D)
- .Case("ocl_image3d" , AMDGPULibFunc::IMG3D)
- .Case("ocl_event" , AMDGPULibFunc::DUMMY)
- .Case("ocl_sampler" , AMDGPULibFunc::DUMMY)
- .Default(AMDGPULibFunc::DUMMY);
+ res.ArgType =
+ StringSwitch<AMDGPULibFunc::EType>(eatLengthPrefixedName(param))
+ .StartsWith("ocl_image1d_array", AMDGPULibFunc::IMG1DA)
----------------
arsenm wrote:
I can get away with the libraries not crashing but something is wrong with this. This should be the name of the type, which has an _ in the spec type names
https://github.com/llvm/llvm-project/pull/119043
More information about the llvm-commits
mailing list