[PATCH] D114002: [LoopVectorize] Check the number of uses of an FAdd before classifying as ordered
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 16 07:37:16 PST 2021
fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.
LGTM with the comment addressed
================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:206
+ // other than the reduction PHI
+ if (Exit->getOpcode() != Instruction::FAdd || Exit->getNumUses() > 2 ||
+ Exit != ExactFPMathInst)
----------------
please use `hasNUsesOrMore` instead of `getNumUses`. `hasNUsesOrMore` doesn't have to traverse the full use list.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114002/new/
https://reviews.llvm.org/D114002
More information about the llvm-commits
mailing list