[PATCH] D89798: [SVE][AArch64] Fix TypeSize warning in loop vectorization legality
Peter Waller via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 10:11:38 PDT 2020
peterwaller-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:1020
+ continue;
+ if (isDereferenceableAndAlignedInLoop(LI, TheLoop, SE, *DT))
SafePointers.insert(LI->getPointerOperand());
----------------
sdesmalen wrote:
> peterwaller-arm wrote:
> > I'd be tempted to make this if (!foo()) continue, so that the "passing" case is in the body of the loop, thus making it straightforward to add or remove conditions from the loop.
> nit: yet now the diff is bigger, it seems simpler to just add one extra line:
> ```
> if (LI && !mustSuppressSpeculation(*LI) &&
> + !LI->getType()->isVectorType() &&
> isDereferenceableAndAlignedInLoop(LI, TheLoop, SE, *DT))```
On this occasion he was following https://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
Is there an etiquette to minimize size-of-diff?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89798/new/
https://reviews.llvm.org/D89798
More information about the llvm-commits
mailing list