[PATCH] D141309: [SLP] Do not ignore ordering for root node when it has in-tree uses.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 11:31:25 PST 2023


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4389-4392
+  // We cannot ignore reordering of root node if it has an in-tree user.
+  if (IgnoreReorder && !VectorizableTree.front()->UserTreeIndices.empty())
+    IgnoreReorder = false;
+
----------------
```
IgnoreReorder &= VectorizableTree.front()->UserTreeIndices.empty();
```
Can we do it before calling reorderBottomToTop?


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/reorder-phi-operand.ll:87
+; Here PHIs have mutual uses of each other. Reordering one requires reordering the other.
+define void @test2(ptr %p1, ptr %p2) {
+; CHECK-LABEL: @test2(
----------------
Precommit the test, please.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141309



More information about the llvm-commits mailing list