[llvm] [SCEV] Look through multiply in computeConstantDifference() (PR #103051)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 08:08:54 PDT 2024


https://github.com/preames approved this pull request.

LGTM

Just in case it helps anyone else - I couldn't remember if it was always safe to distribute a multiply over an add in two's complement, so here's the alive2 proof: https://alive2.llvm.org/ce/z/qcDLqq.  The nonundef is required, but guaranteed in this case since C is a constant.  

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


More information about the llvm-commits mailing list