================
@@ -291,12 +291,9 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions
&Opts,
(getTriple().isAMDGCN() ? getArchNameAMDGCN(GPUKind)
: getArchNameR600(GPUKind));
- // Sanitize the name of generic targets.
+ // Sanitize the name of generic targets, the only names containing '-'.
// e.g. gfx10-1-generic -> gfx10_1_generic
- if (GPUKind >= llvm::AMDGPU::GK_AMDGPU_GENERIC_FIRST &&
- GPUKind <= llvm::AMDGPU::GK_AMDGPU_GENERIC_LAST) {
- llvm::replace(CanonName, '-', '_');
- }
+ llvm::replace(CanonName, '-', '_');
----------------
chinmaydd wrote:
Could we add an example / test for the generic and generic-hsa targets? We
could fail here :
https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/AMDGPU.cpp#L304
https://github.com/llvm/llvm-project/pull/212357
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits