[llvm] [SCCP] Extend `visitBinaryOperator` to overflowing binary ops (PR #84470)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 9 03:40:22 PST 2024


dtcxzyw wrote:

> > > LGTM.
> > > BTW, would you like to fix the regression [dtcxzyw/llvm-opt-benchmark#338 (comment)](https://github.com/dtcxzyw/llvm-opt-benchmark/pull/338#discussion_r1518151927)?
> > > Alive2: https://alive2.llvm.org/ce/z/H2u9si
> > 
> > 
> > Would it make sense to handle this in ConstraintElimination?
> 
> This looks more suited to InstCombine to me.

Yeah, we should fold `sub 0, (udiv nneg X, nneg C)` into `sdiv nneg X, -C` in `InstCombine`.


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


More information about the llvm-commits mailing list