[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
Wed Nov 14 10:22:22 PST 2018


dtemirbulatov added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4130
   }
-  if (ScheduleEnd != OldScheduleEnd) {
+  if (ScheduleEnd != OldScheduleEnd || IsPseudo) {
     // The scheduling region got new instructions at the lower end (or it is a
----------------
We have to clear all dependancy calculations since the pseudo instruction might use already calculated SD node with calculated dependency, look at scheduling_pseudo.ll testcase.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4581
+      Instruction *PickedInst = BundleMember->Inst;
+      if (LastScheduledInst != PickedInst) {
+        BS->BB->getInstList().remove(PickedInst);
----------------
Please check schedule-bundle1.ll testcase, without this change scheduling is not correct.


https://reviews.llvm.org/D28907





More information about the llvm-commits mailing list