[flang-commits] [clang] [flang] [llvm] [lld] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)
Pierre van Houtryve via flang-commits
flang-commits at lists.llvm.org
Thu Feb 1 06:37:45 PST 2024
================
@@ -139,10 +139,10 @@ bool AMDGPURemoveIncompatibleFunctions::checkFunction(Function &F) {
const GCNSubtarget *ST =
static_cast<const GCNSubtarget *>(TM->getSubtargetImpl(F));
- // Check the GPU isn't generic. Generic is used for testing only
- // and we don't want this pass to interfere with it.
+ // Check the GPU isn't generic or generic-hsa. Generic is used for testing
+ // only and we don't want this pass to interfere with it.
StringRef GPUName = ST->getCPU();
- if (GPUName.empty() || GPUName.contains("generic"))
+ if (GPUName.empty() || GPUName.starts_with("generic"))
----------------
Pierre-vh wrote:
No we have some tests using a generic target, and I want the pass to work on -generic targets as well (e.g. gfx9-generic), so I'm moving the check to allow stuff like gfx9-generic but not "generic" alone
https://github.com/llvm/llvm-project/pull/76955
More information about the flang-commits
mailing list