[llvm] [LoopIdiomVectorize] Remove redundant DomTreeUpdates (PR #94681)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 13:18:40 PDT 2024
================
@@ -391,6 +392,14 @@ Value *LoopIdiomVectorize::expandFindMismatch(
BasicBlock *LoopIncBlock = BasicBlock::Create(
Ctx, "mismatch_loop_inc", EndBlock->getParent(), EndBlock);
+ // This is actually one of the only two DTU updates we need. The reason being
+ // that we're splitting `mismatch_end` out of the preheader and put
+ // most of the stuff we create later between the preheader and
+ // `mismatch_end`. Now when DTU removes an edge, it simply recalculates
+ // everything in between. In this case, it will be the prehedaer and
+ // `mismatch_end`, along with the aforementioned content. Therefore we don't
+ // need to insert additional DTU updates for new control flow edges
+ // added in this region.
----------------
mshockwave wrote:
> carrying very subtle update bugs in trunk for a few months until someone was able to trace miscompiles back to domtree
I'm convinced, subtle bugs are indeed easier to creep in with such optimizations. I intend to close this PR unless anyone has other comments.
https://github.com/llvm/llvm-project/pull/94681
More information about the llvm-commits
mailing list