[PATCH] D28907: [SLP] Fix for PR30787: Failure to beneficially vectorize 'copyable' elements in integer binary ops.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 03:50:23 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:355
+ unsigned NewOpcodePos = 0;
+ for (unsigned Cnt = 0, E = VL.size(); Cnt != E; ++Cnt) {
+ auto *I = dyn_cast<Instruction>(VL[Cnt]);
----------------
Comments here on what is being attempted in the loop
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:400
/// \returns The opcode if all of the Instructions in \p VL have the same
/// opcode, or zero.
+static InstructionsState getSameOpcode(ArrayRef<Value *> VL) {
----------------
This comment needs rewriting as it now returns an InstructionState and you needs to explain all the new cases in which it returns.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:408
+ unsigned AltOpcode = getAltOpcode(Opcode);
+ for (int Cnt = 0, E = VL.size(); Cnt < E; Cnt++) {
+ auto *I = cast<Instruction>(VL[Cnt]);
----------------
Comments here on what is being attempted in the loop
https://reviews.llvm.org/D28907
More information about the llvm-commits
mailing list