[PATCH] D28907: [SLP] Fix for PR30787: Failure to beneficially vectorize 'copyable' elements in integer binary ops.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 5 10:04:45 PST 2018


ABataev added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:308
+static unsigned tryToRepresentAsInstArg(unsigned Opcode, Instruction *I) {
+  if (Opcode != Instruction::PHI &&
+      I->getOpcode() != Instruction::PHI &&
----------------
dtemirbulatov wrote:
> ABataev wrote:
> > Instead, I would check for the supported instructions rather than for the unsupported ones.
> The other list is a bit long in my implementation, this one looks better.
I still think it is better to limit this with the list of supported operations rather than the list of the unsupported ones.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1100
+
+  struct PseudoScheduleData : public ScheduleData {
+
----------------
Very strange that you still need particular scheduling class for the pseudo instructions, I think you can use the original data structure if you correctly implement the pseudo instruction itself. I still don't see all the changes we talked about.


https://reviews.llvm.org/D28907





More information about the llvm-commits mailing list