SIGN IN SIGN UP

[SCCP] Fix missing worklist push for recursive calls that update lattice values (#219826)

For a recursive call, the call instruction itself is a user of the
function's arguments. Because I == CurI, I->comesBefore(CurI) is false,
and the condition triggers an early return. The recursive call
instruction was skipped and never pushed back onto the worklist, halting
the solver prematurely before reaching a fixpoint. This caused the
solver to incorrectly believe arguments were hardcoded constants rather
than a wider constant range, resulting in invalid branch folding.

The Fix: This patch updates the condition to explicitly check if I comes
strictly after CurI.

Fixes: https://github.com/llvm/llvm-project/issues/219503
A
AZero13 committed
88f3a791ddb3886cb6fa8d8df1c19e821b7a49b2
Parent: 5bea437
Committed by GitHub <noreply@github.com> on 8/30/2026, 6:21:48 PM