Proving many facts about PHIs in ValueTracking is difficult due to its context-free nature (no caching). However, it is possible to prove that a PHI is non-negative (MSB is known zero) in many real-world situations.
Often, induction variables are very simple. We already have some support for looking at trivial induction variables (simple adds for example) in order to prove low-order bits are always zero due to stride.
This patch introduces more analysis for PHIs. Specifically, if a two-entry PHI has a non-negative constant integer in one operand it will try and trace the other operand through certain instructions until it hopefully finds the PHI again.
The set of instructions that will be recursed through is deliberately small - add, mul and select. On top of this small set, we will only ever follow a linear chain (an add/mul with a non-negative constant integer as the RHS operand). Because we only ever follow a linear chain of simple instructions the search space can never expand too much which also allows us to set a non-tiny search limit.
Minor and subject to your discretion, but summarizing here what you've matched so far may be helpful for reading:
I'm also not sold on the name NewL -- what does "New" signify?