[PATCH] D28907: [SLP] Fix for PR30787: Failure to beneficially vectorize 'copyable' elements in integer binary ops.
Dinar Temirbulatov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 22:53:11 PST 2017
dtemirbulatov added inline comments.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1174
+ ScheduleData *SD = P.second;
+ if (SD && SD->SchedulingRegionID == SchedulingRegionID)
+ Action(SD);
----------------
Here is the fix for the first issue related to the last commit, we have to check SD before usage because it might not be longer valid at the time.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1549
+ if (SameOrAlt <= (VL.size() / 2)) {
+ newTreeEntry(VL, false, UserTreeIdx, S);
+ return;
----------------
I missed this line with the last change.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1843
+
+ // Check that all load operations dominate any real vector operations
+ for (Value *V : VL)
----------------
Here is the solution for the second issue related to the last commit attempt and test-case for the issue is load-dominate.ll
https://reviews.llvm.org/D28907
More information about the llvm-commits
mailing list