[PATCH] D124867: [SLP][NFC] Pre-commit test showing horizontal reduction preventing FMA

Bill Schmidt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 13:03:45 PDT 2022


wjschmidt added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/slp-reduc-fma-loss.ll:37
+  %x.596 = fmul fast double undef, undef
+  %x.597 = fadd fast double %x.596, %x.578
+  %x.615 = fmul fast double undef, undef
----------------
vporpo wrote:
> Nit: Please try to use slightly more readable names. These are chains of fmul, fadd so perhaps name them like:
> ```
> %mul0 = fmul ...
> %add0 = fadd ... %mul0 ...
> %mul1 = fmul ...
> %add1 = fadd ... %mul1 ...
> ```
Thanks, will do.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/slp-reduc-fma-loss.ll:40
+  %x.616 = fadd fast double %x.615, %x.597
+  br i1 undef, label %exit, label %loop
+
----------------
vporpo wrote:
> The test should still work without the loop
Sadly, it does not.  If I remove the loop branches and the phi and replace the phi uses with undef, the vectorizer no longer finds the horizontal reduction profitable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124867/new/

https://reviews.llvm.org/D124867



More information about the llvm-commits mailing list