[PATCH] D77973: [VPlan] Move widening check for non-memory/non-calls to function (NFC).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 02:05:08 PDT 2020


fhahn marked 2 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6940
+bool VPRecipeBuilder::shouldWiden(Instruction *I, VFRange &Range) const {
+  assert(!isa<PHINode>(I) && "PHIs should have been handled earlier");
+  // Instruction should be widened, unless it is scalar after vectorization,
----------------
Ayal wrote:
> Retain the !isa<Call, Load, Store> alongside !isa<PHI>?
> To avoid using this method for such opcodes, as their widening decision is more complex.
I've brought it back, but with the new code structure, it also required adding an early exit for calls, loads & stores, but I think that makes sense. What do you think?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6969
     case Instruction::BitCast:
     case Instruction::Br:
     case Instruction::FAdd:
----------------
Ayal wrote:
> Branches should also find their way out of IsVectorizableOpcode and into an assert; no recipes are created for them.
Will submit as a follow-up commit once this one lands.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77973/new/

https://reviews.llvm.org/D77973





More information about the llvm-commits mailing list