Re-re-land: Teach CorrelatedValuePropagation to reduce the width of udiv/urem instruc...
authorJustin Lebar <jlebar@google.com>
Wed, 21 Mar 2018 14:08:21 +0000 (14:08 +0000)
committerJustin Lebar <jlebar@google.com>
Wed, 21 Mar 2018 14:08:21 +0000 (14:08 +0000)
commit038cbc5c13e33052c1b7dad1112c2a062e7c565e
tree7e0dc8c207bb211bb0e63ffc1185ae1b179b0edd
parentdaf69ac2b2a87198f811eab02d650824af4e0f51
Re-re-land: Teach CorrelatedValuePropagation to reduce the width of udiv/urem instructions.

Summary:
If the operands of a udiv/urem can be proved to fit within a smaller
power-of-two-sized type, reduce the width of the udiv/urem.

Backed out for causing performance regressions.  Re-landing
because we've determined that these regressions were noise.

Original Differential Revision: https://reviews.llvm.org/D44102

llvm-svn: 328096
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
llvm/test/Transforms/CorrelatedValuePropagation/udiv.ll [new file with mode: 0644]
llvm/test/Transforms/CorrelatedValuePropagation/urem.ll [new file with mode: 0644]