[PATCH] D22214: Convert a signed remainder instruction to unsigned remainder

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 05:34:13 PDT 2016


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: bkramer, chandlerc, jmolloy, mehdi_amini.
SjoerdMeijer added a subscriber: llvm-commits.

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.

http://reviews.llvm.org/D22214

Files:
  lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  test/Transforms/CorrelatedValuePropagation/srem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22214.63491.patch
Type: text/x-patch
Size: 4696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160711/d52921da/attachment.bin>


More information about the llvm-commits mailing list