This converts a signed remainder instruction to unsigned remainder, which
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 14 Jul 2016 12:23:48 +0000 (12:23 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 14 Jul 2016 12:23:48 +0000 (12:23 +0000)
commit716abbb2f51bc4696f9c45a7b7b91d2f69ffb4e1
tree403aad0bfc1f03d211848a03e050cb41c7526f4a
parent700e4a1ab87f1a04cfe0733ac0b67149eaad0d30
This converts a signed remainder instruction to unsigned remainder, which
enables the code size optimisation to fold a rem and div into a single
aeabi_uidivmod call. This was not happening before because sdiv was converted
but srem not, and instructions with different signedness are not combined.

Differential Revision: http://reviews.llvm.org/D22214

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