OSDN Git Service

ARM: address WoA division limitation
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 25 Sep 2015 05:15:46 +0000 (05:15 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 25 Sep 2015 05:15:46 +0000 (05:15 +0000)
commit64ed61ca6b86b020907d0f3487d18b7b1535eda1
tree410785171c92c5fcc75d6650f90280f5407a2300
parent29c29e1c0f3c67b3f36d03fcf71ffd0059c33869
ARM: address WoA division limitation

We now emit the compiler generated divide by zero check that was needed for the
MSVC routines.  We construct a psuedo-instruction for the DBZ check as the
operation requires splitting up the BB.  For the 64-bit operations, we need to
custom expand the node as we need to insert the DBZ check and then emit the
libcall to the appropriate name.  Because this is target specific, it seemed
better to reproduce the expansion operation from the target-agnostic type
legalization rather than sink this there to avoid the duplication.  The division
library calls now match MSVC semantically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248561 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/ARM/ARMInstrInfo.td
test/CodeGen/ARM/Windows/division.ll [new file with mode: 0644]
test/CodeGen/ARM/Windows/libcalls.ll