[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
Tue Nov 7 10:54:33 PST 2017
ABataev added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:849
+ /// Maps a specific scalar to its tree entry(s) with leading scalar.
+ SmallDenseMap<Value*, SmallDenseMap<Value*, int>> ExtraScalarToTreeEntry;
+
----------------
Not formatted
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1509
InstructionsState S = getSameOpcode(VL);
+
if (Depth == RecursionMaxDepth) {
----------------
Remove it
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1549
+ SameOrAlt++;
+ if (S.Opcode != Opcode)
+ DiffOp++;
----------------
I think it is enough `else` here. If the opcode is not the same or alternate, it is different. And the final criteria may be simplified like `if (SameOrAlt <= VL.size() / 2) return;`
https://reviews.llvm.org/D28907
More information about the llvm-commits
mailing list