[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 15:15:56 PST 2024
================
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
}
break;
}
+ case Intrinsic::amdgcn_wavefrontsize: {
+ // TODO: this is a workaround for the pseudo-generic target one gets with no
+ // specified mcpu, which spoofs its wave size to 64; it should be removed.
+ if ((ST->getCPU().empty() || ST->getCPU() == "generic") &&
+ !ST->getFeatureString().contains("+wavefrontsize"))
----------------
jhuber6 wrote:
Unsure if we even need to bother checking for 'generic' since that's not what any of the existing targets use for generic AFAIC. It's just not setting `-mcpu` when you compile, which I think should probably be an error in the backend.
https://github.com/llvm/llvm-project/pull/114481
More information about the llvm-commits
mailing list