[PATCH] D24182: [InstCombine] Fix for PR29124: reduce insertelements to shufflevector

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 07:27:54 PDT 2016


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with 2 minor corrections.


================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:658
@@ +657,3 @@
+    auto ValI = std::begin(Val);
+    for (uint64_t I : InsertIdx) {
+      if (!Values[I]) {
----------------
Please add a comment describing what this loop is doing.

================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:667
@@ -632,1 +666,3 @@
     }
+    for (unsigned I = 0; I < NumElts; ++I) {
+      if (!Values[I]) {
----------------
Please add a comment describing what this loop is doing.


https://reviews.llvm.org/D24182





More information about the llvm-commits mailing list