[PATCH] D117307: [LoopVectorize] Only check for ordered reductions if the op chain was found
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 17 08:40:53 PST 2022
david-arm added inline comments.
================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:1041
SmallVector<Instruction *, 4>
-RecurrenceDescriptor::getReductionOpChain(PHINode *Phi, Loop *L) const {
+RecurrenceDescriptor::getReductionOpChain(PHINode *Phi, Loop *L,
+ Instruction *LoopExitInstr,
----------------
nit: Thanks for addressing my previous comment - it looks a lot neater now and easier to review. :) Given that `RecurrenceDescriptor` now has both `getReductionOpChain` and `getReductionChain` functions, is it worth renaming `getReductionOpChain` to something like `findReductionOpChain`?
================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:1087
// from the phi and one from a LCSSA value, no matter the type.
- if (!isCorrectOpcode(LoopExitInstr) || !LoopExitInstr->hasNUses(2))
return {};
----------------
Sorry I missed this before - perhaps this change shouldn't be part of this patch because it looks like it may be adding new cases that aren't being tested for correctness?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117307/new/
https://reviews.llvm.org/D117307
More information about the llvm-commits
mailing list