[PATCH] [Request, 81 lines] D25077: [ARM] Lower UDIV+UREM to UDIV+MLS (and the same for SREM)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 01:25:44 PDT 2016


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: jmolloy, t.p.northover, rengolin.
SjoerdMeijer added a subscriber: llvm-commits.
Herald added subscribers: samparker, aemerson.

Code size optimisation to lower udiv+urem to udiv+mls instead of a library call to __aeabi_uidivmod. This is an improved implementation of r280808, see also https://reviews.llvm.org/D24133, that got reverted because isel was stuck in a loop. That was caused by the optimisation incorrectly triggering on i64 ints, which shouldn't happen because there is no 64bit hwdiv support; that put isel's type legalization and this optimisation in a loop. A native ARM compiler and testing now shows that this is fixed.

      

Patch mostly by Pablo Barrio.


https://reviews.llvm.org/D25077

Files:
  lib/Target/ARM/ARMISelLowering.cpp
  test/CodeGen/ARM/urem-opt-size.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25077.73002.patch
Type: text/x-patch
Size: 5021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160930/d4ed799c/attachment.bin>


More information about the llvm-commits mailing list