[PATCH] D48457: [LoopUnswitch]Fix comparison for DomTree updates.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 16:29:59 PDT 2018
asbirlea added a comment.
Thank you for the review!
================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:947
Updates.push_back({DominatorTree::Insert, OldBranchParent, TrueDest});
- if (FalseDest != OldBranchParent)
+ if (FalseDest != OldBranchSucc)
Updates.push_back({DominatorTree::Insert, OldBranchParent, FalseDest});
----------------
kuhar wrote:
> asbirlea wrote:
> > kuhar wrote:
> > > Is it possible that TrueDest == FalseDest? In this is the case, we should check it here as well.
> > This should not be possible.
> > The logic is contained to LoopUnswitch and the two callsites for this method each have a new block as the TrueDest and an existing block as FalseDest. I can add an assert (TrueDest != FalseDest), if you think it would be helpful.
> I think it would make it clear for whoever tries to figure out the correct logic here later.
Ack, done.
Repository:
rL LLVM
https://reviews.llvm.org/D48457
More information about the llvm-commits
mailing list