[PATCH] D96350: [SVE][LoopVectorize] Enable vectorization of fmin/fmax with nnan

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 09:26:49 PST 2021


david-arm added inline comments.


================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:598
+    if (isFPMinMaxRecurrenceKind(Kind) &&
+        (HasFunNoNaNAttr || I->hasNoNaNs()))
+      return isMinMaxSelectCmpPattern(I, Prev);
----------------
Hi @kmclaughlin, I've not looked into this in the same detail as you have, but I wonder if the reason we only checked the function attribute previously is because the reduction is used outside the loop? Not saying that's a good reason for not vectorising though. :) Just that perhaps it was technically the easier solution since we might have to also look outside the loop to make sure users of the value also don't care about NaNs? Perhaps @dmgreen or @spatel have an idea?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96350



More information about the llvm-commits mailing list