[CVP] When expanding `urem`, always freeze the nominator
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 31 Dec 2022 01:58:22 +0000 (04:58 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 31 Dec 2022 02:00:43 +0000 (05:00 +0300)
commit08c2f4eb7ab3e75eb9d2048f73ea9874c663fb5a
tree52bda29830f3a81e43024d20ca98591b9a83585d
parentf77dcdf2db2b4a901538bb0ee1c1845a0ba1f18e
[CVP] When expanding `urem`, always freeze the nominator

As per the post-commit feedback - that was not the correct precondition
to avoid it here. I think we should generally start changing mentality
about `freeze`, the fact that we have been conditioned to be afraid of it
(or of anything in LLVM in general) is the key problem here.
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
llvm/test/Transforms/CorrelatedValuePropagation/urem-expansion.ll
llvm/test/Transforms/CorrelatedValuePropagation/urem.ll
llvm/test/Transforms/PhaseOrdering/cmp-logic.ll