[llvm] r307145 - [ARM] GlobalISel: Extract tiny helper. NFC
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 04:53:51 PDT 2017
Author: rovka
Date: Wed Jul 5 04:53:51 2017
New Revision: 307145
URL: http://llvm.org/viewvc/llvm-project?rev=307145&view=rev
Log:
[ARM] GlobalISel: Extract tiny helper. NFC
Extract functionality for determining if the target uses AEABI.
Modified:
llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp?rev=307145&r1=307144&r2=307145&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp Wed Jul 5 04:53:51 2017
@@ -28,6 +28,10 @@ using namespace llvm;
#error "You shouldn't build this"
#endif
+static bool AEABI(const ARMSubtarget &ST) {
+ return ST.isTargetAEABI() || ST.isTargetGNUAEABI() || ST.isTargetMuslAEABI();
+}
+
ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
using namespace TargetOpcode;
@@ -66,8 +70,7 @@ ARMLegalizerInfo::ARMLegalizerInfo(const
for (unsigned Op : {G_SREM, G_UREM})
if (ST.hasDivideInARMMode())
setAction({Op, s32}, Lower);
- else if (ST.isTargetAEABI() || ST.isTargetGNUAEABI() ||
- ST.isTargetMuslAEABI())
+ else if (AEABI(ST))
setAction({Op, s32}, Custom);
else
setAction({Op, s32}, Libcall);
More information about the llvm-commits
mailing list