[llvm] [ConstraintElim] Strengthen flags at the closest dominator of all uses. (PR #220918)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 10:56:36 PDT 2026
================
@@ -1543,10 +1573,12 @@ void State::addInfoFor(BasicBlock &BB) {
WorkList.push_back(FactOrCheck::getInstFact(DT.getNode(&BB), BO));
}
- // Queue instructions whose flags may be strengthened based on the facts
- // that hold on entry to BB.
+ // Queue instructions whose flags may be strengthened, checked at the
+ // closest point dominating all uses.
if (canStrengthenFlags(&I))
- WorkList.push_back(FactOrCheck::getCheck(DT.getNode(&BB), &I));
+ if (Instruction *CommonDom = findCommonDominatorOfUses(I, DT))
----------------
dtcxzyw wrote:
CommonDom should be nonnull.
https://github.com/llvm/llvm-project/pull/220918
More information about the llvm-commits
mailing list