]> granicus.if.org Git - llvm/commit
[ARM] Code size optimisation to lower udiv+urem to udiv+mls instead of a
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 3 Oct 2016 10:12:32 +0000 (10:12 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 3 Oct 2016 10:12:32 +0000 (10:12 +0000)
commitec44dc9079a8c66dac01ed47d2ea831c0a693f18
tree9ced39733aca50bf7663ab630521d9ecb278ffff
parent6fd795dee81e6b2f3e08fcdfd58ce1cc840acfd8
[ARM] 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 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.

Differential Revision: https://reviews.llvm.org/D25077

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283098 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/urem-opt-size.ll