[PATCH] D157713: [VPlan] Perform tail folding as VPlan transform. (WIP)
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 06:56:29 PDT 2023
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8184
+static bool mayCauseUB(unsigned Opcode) {
+ switch (Opcode) {
+ case Instruction::UDiv:
----------------
What about float point division?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8259-8261
+ if (!BlockMask) {
+ BlockMask = R.getMask();
+ }
----------------
Drop braces here for one line sub-block
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8262
+ }
+ assert(BlockMask == R.getMask());
+ R.setOperand(R.getNumOperands() - 1, OrWithHeaderMask(BlockMask, &R));
----------------
Add assertion message
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8271
+ if (auto *Blend = dyn_cast<VPBlendRecipe>(&R)) {
+ for (unsigned I = 0; I < Blend->getNumIncomingValues(); ++I) {
+ VPValue *Cond = Blend->getMask(I);
----------------
`for (unsigned I = 0, E = Blend->getNumIncomingValues(); I < E; ++I)`
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8280-8281
+ R.setOperand(R.getNumOperands() - 1, OrWithHeaderMask(BlockMask, &R));
+ } else
+ R.addOperand(HeaderMask);
+ }
----------------
Add braces here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157713/new/
https://reviews.llvm.org/D157713
More information about the llvm-commits
mailing list