[llvm] [ValueTracking] Perform a local edge implication check for isKnownNonNegative (PR #72437)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 08:39:19 PST 2023


preames wrote:

> Duplicate of #72049
I don't agree here.  This is some overlap, but this patch is narrower in scope, and is motivated by the desire to simplify a particular bit of client code from https://github.com/llvm/llvm-project/pull/72431.

I do think this is a very worthwhile practical trade off.  Non-negative zexts in loop pre-headers is pretty much the canonical use case for nneg.  Having to do expensive analysis (as opposed to isKnownX) for these cases seems like overkill, and as seen in the linked patch, creates nasty pass ordering problems.   

https://github.com/llvm/llvm-project/pull/72437


More information about the llvm-commits mailing list