[llvm] [ValueTracking] Extend LHS/RHS with matching operand to work without constants. (PR #85557)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 19:51:28 PDT 2024


goldsteinn wrote:

> > > Rebased, limited CR analysis to MaxRecursiveDepth - 1. My feeling is this is mostly to capture relationships like `X u> Y` implies `X != 0`. Using CR is IMO the easiest way to avoid implementing bespoke logic here.
> > 
> > 
> > Using MaxRecursiveDepth - 1 is not particularly useful in this context, because computeConstantRange() is already essentially non-recursive.
> > This change would be ok if it were free, but it isn't (https://llvm-compile-time-tracker.com/compare.php?from=7d60232b38b66138dae1b31027d73ee5b9df5c58&to=2f155d6f9baacec48a9f69abffbfbca91ef57b46&stat=instructions:u). I don't think that it justifies the cost.
> 
> Okay, ill work to make it free.

@nikic, limited to requiring one constant (either `L1` or `R1`) and that seems to address all the compile time concerns:
https://llvm-compile-time-tracker.com/compare.php?from=7aa371687ace40b85f04e21956e03f1e93052b56&to=98198d78a9a2c0e8e5eadf60ff0f4b57ba248698&stat=instructions:u


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


More information about the llvm-commits mailing list