[PATCH] D128831: [VPlan] Move remove dead recipes before merging regions.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 20:37:39 PDT 2022


fhahn marked 2 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll:1106
 ; CHECK-NEXT:     pred.store.continue:
+; CHECK-NEXT:       PHI-PREDICATED-INSTRUCTION vp<[[P_LOAD:%.+]]> = ir<%l>
 ; CHECK-NEXT:     No successors
----------------
Ayal wrote:
> Should removeDeadRecipes also run after mergeReplicateRegions, to clean-up such phi recipes it leaves behind?
Yes, those should also be removed, what is missing is handling in `mayHaveSideeffects`, which I am also planning on adding as follow-up.


================
Comment at: llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll:1143
   %l = load i32, i32* %gep.src, align 16
   %dead_gep = getelementptr inbounds i32, i32* %dst, i64 1
   %gep.dst = getelementptr inbounds i32, i32* %dst, i32 %iv
----------------
Ayal wrote:
> Hmm, this dead_gep may indeed prevent regions to merge, but is it visible in VPlan?
Yes it should be, but we only print the plans once, after all transforms have been applied, so it is not shown in the dump


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128831



More information about the llvm-commits mailing list