[PATCH] D111555: [LoopVectorize] Add strict reduction support for fmuladd intrinsic

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 02:24:13 PDT 2021


dmgreen added a comment.

I think you can remove the "strict" from the title and summary of this patch, if I'm understanding what strict means here. As far as I understand it should enable vectorization for strict (inloop) and non-strict (out of loop/fast) reductions of llvm.fmuladd, which is nice.
https://godbolt.org/z/xTe89GEfM



================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:1059
+    if (Kind == RecurKind::FMulAdd)
+      return true;
+
----------------
Is this just returning true because it believes the only instruction found in a fmuladd reduction chain will be a llvm.fmuladd? Could that change in the future if it was able to recognize fadd and fmuladd as single reduction sequence?

Would it be better to check the instruction is isFMulAddIntrinsic, to be on the safe side?


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

https://reviews.llvm.org/D111555



More information about the llvm-commits mailing list