[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 Jul 31 04:07:39 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:469
+ return InstructionsState(VL[BaseIndex], cast<Instruction>(VL[BaseIndex]),
+ cast<Instruction>(VL[AltIndex]), IsNonAlt);
+ else
----------------
InstructionState was keeping the Base/Alt instructions the same if AltOpcodeNum ==0 (BaseIndex ==AltIndex) - why are you inserting nulls?
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1526
+static Value *getDefaultConstantForOpcode(unsigned Opcode, Type *Ty) {
+ switch(Opcode) {
----------------
Can we use ConstantExpr::getBinOpIdentity instead?
https://reviews.llvm.org/D28907
More information about the llvm-commits
mailing list