[PATCH] D109645: [LV] Recognize intrinsic min/max reductions

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 14 04:50:37 PDT 2021


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/test/Transforms/LoopVectorize/minmax_reduction.ll:998
   %0 = load float, float* %arrayidx, align 4
   %1 = tail call fast float @llvm.maxnum.f32(float %s.011, float %0)
   %inc = add nuw nsw i32 %i.012, 1
----------------
spatel wrote:
> Either this test or the previous one could be just "nnan nsz" rather than "fast" so we are testing the minimum FMF (assuming that works as expected).
Sorry if I wasn't clear, but it would be better to have one of these tests have minimal FMF and one have extra FMF (ie, the original 'fast' was good) because that shows we are propagating all FMF as expected even if they are not required for the transform. Alternatively, we could add a 2nd test for maxnum with 'fast'.


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

https://reviews.llvm.org/D109645



More information about the llvm-commits mailing list