[llvm] Handle VECREDUCE intrinsics in NVPTX backend (PR #136253)
Princeton Ferro via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 09:28:16 PDT 2025
================
@@ -83,6 +83,8 @@ class NVPTXTTIImpl : public BasicTTIImplBase<NVPTXTTIImpl> {
}
unsigned getMinVectorRegisterBitWidth() const { return 32; }
+ bool shouldExpandReduction(const IntrinsicInst *II) const { return false; }
----------------
Prince781 wrote:
To rephrase:
There are three types of reductions possible: sequential (`a + b + c + d`), shuffle (`(a + c) + (b + d)`), and tree (`(a + b) + (c + d)`). `ExpandReductions` pass and SelectionDAG only supports the first two. If we handle reductions in the NVPTX backend, we can support all three.
https://github.com/llvm/llvm-project/pull/136253
More information about the llvm-commits
mailing list