[PATCH] D21926: [ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 04:38:11 PDT 2016


rovka created this revision.
rovka added reviewers: rengolin, compnerd, jroelofs, tyomitch, asl, t.p.northover.
rovka added a subscriber: llvm-commits.
Herald added subscribers: srhines, danalbert, tberghammer, rengolin, aemerson.

At higher optimization levels, we generate the libcall for SDIVREM_Ix, which is 
fine: __aeabi_{u|i}divmod. At -O0 we generate the one for SREM_Ix, which is the
default  __{u}mod{q|h|s|d}i3.

This commit makes sure that the libcall for SREM_Ix uses the ABI-compliant 
__aeabi_{u|i}divmod instead of the default, so we'll have the same behaviour at
all optimization levels.
    
It also updates the divmod-eabi.ll test to run under -O0 as well, and relaxes it
so we can use the same check lines for both -O0 and -O2.
    
Fixes PR27068


http://reviews.llvm.org/D21926

Files:
  lib/Target/ARM/ARMISelLowering.cpp
  test/CodeGen/ARM/divmod-eabi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21926.62480.patch
Type: text/x-patch
Size: 5911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160701/e341b650/attachment.bin>


More information about the llvm-commits mailing list