[PATCH] D136757: [SLP] Extend reordering data of tree entry to support PHI nodes

krishna chaitanya sankisa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 08:22:40 PDT 2022


skc7 added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3826
     return TE.ReorderIndices;
+  if (TE.State == TreeEntry::Vectorize && TE.getOpcode() == Instruction::PHI) {
+    auto PHICompare = [](llvm::Value *V1, llvm::Value *V2) {
----------------
ABataev wrote:
> I believe this can be used not only for PHIs, but for other instructions too
I have seen this issue with only PHIs in my code walkthrough. Haven't come across a case where ordering of other instructions in BB changes resulting shuffle mask. 


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

https://reviews.llvm.org/D136757



More information about the llvm-commits mailing list