[ARM] GlobalISel: Lower single precision FP args
Both for aapcscc and aapcs_vfpcc. We currently filter out soft float targets
because we don't support libcalls yet.
llvm-svn: 294584
diff --git a/llvm/lib/Target/ARM/ARMCallLowering.cpp b/llvm/lib/Target/ARM/ARMCallLowering.cpp
index f37d6d7..34b8168 100644
--- a/llvm/lib/Target/ARM/ARMCallLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMCallLowering.cpp
@@ -35,7 +35,7 @@
static bool isSupportedType(const DataLayout &DL, const ARMTargetLowering &TLI,
Type *T) {
EVT VT = TLI.getValueType(DL, T, true);
- if (!VT.isSimple() || !VT.isInteger() || VT.isVector())
+ if (!VT.isSimple() || VT.isVector())
return false;
unsigned VTSize = VT.getSimpleVT().getSizeInBits();
@@ -205,7 +205,13 @@
auto DL = MF.getDataLayout();
auto &TLI = *getTLI<ARMTargetLowering>();
- if (TLI.getSubtarget()->isThumb())
+ auto Subtarget = TLI.getSubtarget();
+
+ if (Subtarget->isThumb())
+ return false;
+
+ // FIXME: Support soft float (when we're ready to generate libcalls)
+ if (Subtarget->useSoftFloat() || !Subtarget->hasVFP2())
return false;
auto &Args = F.getArgumentList();