diff options
author | Amara Emerson <aemerson@apple.com> | 2019-07-24 23:00:04 +0000 |
---|---|---|
committer | Amara Emerson <aemerson@apple.com> | 2019-07-24 23:00:04 +0000 |
commit | de81bd0faa5413602b52ed4b876c79dc785f599b (patch) | |
tree | fcb0d36297afd507bd6a4276450466508766af9c /llvm/lib/Target/AArch64 | |
parent | 86814bf658a64ac11e548f0a133c9a7d9ca3f831 (diff) | |
download | bcm5719-llvm-de81bd0faa5413602b52ed4b876c79dc785f599b.tar.gz bcm5719-llvm-de81bd0faa5413602b52ed4b876c79dc785f599b.zip |
[AArch64][GlobalISel] Don't try to use GISel if subtarget doesn't have neon or fp.
Throughout the legalizerinfo we currently make the assumption that the target
has neon and FP target features available. Fixing it will require a refactor of
the whole thing, so until then make sure we fall back.
Works around PR42734
Differential Revision: https://reviews.llvm.org/D65244
llvm-svn: 366957
Diffstat (limited to 'llvm/lib/Target/AArch64')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp b/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp index 32d5afc3a82..57e522a8fcd 100644 --- a/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp @@ -52,6 +52,12 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST) { const LLT v2s64 = LLT::vector(2, 64); const LLT v2p0 = LLT::vector(2, p0); + // FIXME: support subtargets which have neon/fp-armv8 disabled. + if (!ST.hasNEON() || !ST.hasFPARMv8()) { + computeTables(); + return; + } + getActionDefinitionsBuilder(G_IMPLICIT_DEF) .legalFor({p0, s1, s8, s16, s32, s64, v4s32, v2s64}) .clampScalar(0, s1, s64) |