summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-04-21 11:53:01 +0000
committerDiana Picus <diana.picus@linaro.org>2017-04-21 11:53:01 +0000
commitf941ec0ecc2d177f54a94ad429278947556a3ea9 (patch)
tree2c5b7b4dd6b0ab9fb9669863c20256ba692b9553 /llvm/lib
parent0cd1b539bcff45a94a5e1e8b71985d0f1a4dc455 (diff)
downloadbcm5719-llvm-f941ec0ecc2d177f54a94ad429278947556a3ea9.tar.gz
bcm5719-llvm-f941ec0ecc2d177f54a94ad429278947556a3ea9.zip
[ARM] GlobalISel: Make struct arguments fail elegantly
The condition in isSupportedType didn't handle struct/array arguments properly. Fix the check and add a test to make sure we use the fallback path in this kind of situation. The test deals with some common cases where the call lowering should error out. There are still some issues here that need to be addressed (tail calls come to mind), but they can be addressed in other patches. llvm-svn: 300967
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMCallLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMCallLowering.cpp b/llvm/lib/Target/ARM/ARMCallLowering.cpp
index 94b317a8f98..13fb30767c9 100644
--- a/llvm/lib/Target/ARM/ARMCallLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMCallLowering.cpp
@@ -35,7 +35,8 @@ ARMCallLowering::ARMCallLowering(const ARMTargetLowering &TLI)
static bool isSupportedType(const DataLayout &DL, const ARMTargetLowering &TLI,
Type *T) {
EVT VT = TLI.getValueType(DL, T, true);
- if (!VT.isSimple() || VT.isVector())
+ if (!VT.isSimple() || VT.isVector() ||
+ !(VT.isInteger() || VT.isFloatingPoint()))
return false;
unsigned VTSize = VT.getSimpleVT().getSizeInBits();
OpenPOWER on IntegriCloud