[PATCH] D114909: [SLP]Outline and fix code for finding common insertelement vectors.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 16:16:35 PST 2021


vporpo added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5392
+  auto *IE2 = V;
+  // Go through of insertelement instructions trying to find either VU as
+  // the original vector for IE2 or V as the original vector for IE1.
----------------
Could you fix the comment. I guess it meant to say something like: "Go through *the vector operand* of  insertelement instructions..."


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5398
+    if (IE1) {
+      if (IE1 != VU && !IE1->hasOneUse())
+        IE1 = nullptr;
----------------
Just curious, why do we need to check for for a single use except for VU and V? Is this related to the bug you mentioned in the patch summary?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114909/new/

https://reviews.llvm.org/D114909



More information about the llvm-commits mailing list