[PATCH] D107966: [SLP]Do not emit extract elements for insertelements users, replace with shuffles directly.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 06:09:07 PDT 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8489
+    // Find the first and the last instruction in the list of insertelements.
+    sort(ShuffledInserts[I].InsertElements, isFirstInsertElement);
+    InsertElementInst *FirstInsert = ShuffledInserts[I].InsertElements.front();
----------------
ABataev wrote:
> fhahn wrote:
> > Is it possible that the relative order of elements that compare as equal matters in the code below? With stable_sort, I am not seeing the crash.
> Let me check, yeah, most probably caused by the libc++ diff.
> I used sort here as I hoped there should not be difference between sort and stable sort results.
Could you check again after f9c806ae5c53c990a935c46ba351cdcfb1271c58?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107966



More information about the llvm-commits mailing list