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

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 09:09:27 PST 2021


kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, spatel, dmgreen.
Herald added subscribers: psnobl, hiraditya, tschuett.
Herald added a reviewer: efriedma.
kmclaughlin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The fmin/fmax tests added by D95245 <https://reviews.llvm.org/D95245> use the `no-nans-fp-math` function
attribute, and fail to vectorize when the attribute is removed in favour of using
`nnan` directly in the instructions. This patch changes isRecurrenceInstr
to also check if the no-NaNs flag is set on the fcmp/select.

I'm not sure if there are any problems with this approach, which is why I've
split this out from D95245 <https://reviews.llvm.org/D95245>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96350

Files:
  llvm/lib/Analysis/IVDescriptors.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/scalable-reductions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96350.322411.patch
Type: text/x-patch
Size: 5764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210209/b6c58593/attachment.bin>


More information about the llvm-commits mailing list