[PATCH] D54546: [ARM] Don't expand sdiv when optimising for minsize

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 22 08:41:54 PST 2018


SjoerdMeijer added inline comments.


================
Comment at: test/CodeGen/ARM/sdiv-pow2-arm-size.ll:14
+; NODIV:       mov r1, #2
+; NODIV-NEXT:  bl  __divsi3
+; NODIV-NEXT:  sxth r0, r0
----------------
efriedma wrote:
> Not sure the libcall is the right choice... yes, in your tiny testcase, it saves one instruction, but a libcall is going to force spilling for most realistic functions.
Ok, yes, fair enough. I will change this and also in ARM mode won't generate the sdiv if hwdiv is unsupported.


https://reviews.llvm.org/D54546





More information about the llvm-commits mailing list