[llvm] [NVPTX] Add IR pass for FMA transformation in the llc pipeline (PR #154735)
Rajat Bajpai via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 5 03:38:11 PDT 2025
rajatbajpai wrote:
> This is SLP vectorizer's job, and the other vectorizer.s
>
> IMO there's no reason this should be a new pass
I understand the intention but I have three concerns:
1. Currently, the SLPVectorizer is invoked within the opt pipeline. Introducing it in llc solely for FMA vectorisation may not be justified, especially if its scope remains limited to that functionality.
2. The NVPTXIRPeephole pass will synthesize FMAs during llc. For the SLPVectorizer to recognize and act on these FMAs, it must be scheduled after this pass. Otherwise, it won't have visibility into the transformed instructions.
3. As far as I understand, SLPVectorizer performs vectorization that benefits multiple backends. However, it's unclear which other targets would gain from FMA-specific vectorization. Even for NVPTX, the benefits of this transformation are not universally guaranteed.
https://github.com/llvm/llvm-project/pull/154735
More information about the llvm-commits
mailing list