goldsteinn wrote:

Not an issue now but I think we should look into updating 
`computeKnownBitsFromContext` to look use `trunc nsw/nuw` uses of `X`. If the 
use is dominating / noundef, we can infer bits about `X`.
Not really an issue if we only use `KnownBits` to infer `nuw`/`nsw`, but once 
we add support in `SCEV`/`CVP`/`SCCP`/etc.. it may be useful.

Guess same is true for `zext nneg` now (and could probably also do `sub nuw X, 
nonzero_Y` now in `isKnownNonNullFromDominatingCondition`).

https://github.com/llvm/llvm-project/pull/87910
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to