dtcxzyw wrote: IIRC the regression can be fixed by handling this pattern in `isKnownNonZero`. It would be better to add a helper `stripNullTest` to find patterns in the form of `f(x) == 0 <-> x == 0`. https://github.com/llvm/llvm-project/pull/143683