[llvm] [SCEV] Collect guard info for ICMP NE w/o constants. (PR #160500)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 16 06:55:37 PDT 2025


fhahn wrote:

> > Maybe instead of eagerly creating the expressions, we could just record LHS != RHS, and then materialize only when we hit were visiting LHS in the rewriter?
> 
> This generally makes sense to me. Would the approach be look for `(-1 * %a + %b)` SCEVAddExprs in the rewriter, check whether we have a `%a != %b` fact and then do the umax replacement there?

Yep, I put up a first version for this, which is able to handle all tests from this PR https://github.com/llvm/llvm-project/pull/163787

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


More information about the llvm-commits mailing list