[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 09:35:09 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.
----------------
jhuber6 wrote:

A real solution would be two builds, but spoofing it as 64 works, (likely unintentinally) because we don't do any w64 specific changes yes and w64 can always be narrowed to w32 and not the other way around.

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


More information about the cfe-commits mailing list