[PATCH] D65244: [AArch64][GlobalISel] Don't try to use GISel if subtarget doesn't have neon or fp.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 16:00:39 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL366957: [AArch64][GlobalISel] Don't try to use GISel if subtarget doesn't have neon or… (authored by aemerson, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D65244?vs=211605&id=211625#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65244/new/

https://reviews.llvm.org/D65244

Files:
  llvm/trunk/lib/Target/AArch64/AArch64LegalizerInfo.cpp
  llvm/trunk/test/CodeGen/AArch64/GlobalISel/no-neon-no-fp.ll


Index: llvm/trunk/lib/Target/AArch64/AArch64LegalizerInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64LegalizerInfo.cpp
+++ llvm/trunk/lib/Target/AArch64/AArch64LegalizerInfo.cpp
@@ -52,6 +52,12 @@
   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)
Index: llvm/trunk/test/CodeGen/AArch64/GlobalISel/no-neon-no-fp.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/no-neon-no-fp.ll
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/no-neon-no-fp.ll
@@ -0,0 +1,13 @@
+; RUN: not llc -o - -verify-machineinstrs -global-isel -global-isel-abort=1 -stop-after=legalizer %s 2>&1 | FileCheck %s
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-unknown-unknown"
+
+; CHECK: unable to legalize instruction: G_STORE %1:_(s128), %0:_(p0) :: (store 16 into %ir.ptr) (in function: foo)
+define void @foo(i128 *%ptr) #0 align 2 {
+entry:
+  store i128 0, i128* %ptr, align 16
+  ret void
+}
+
+attributes #0 = { "use-soft-float"="false" "target-features"="-fp-armv8,-neon" }
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65244.211625.patch
Type: text/x-patch
Size: 1467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190724/cd1e9202/attachment.bin>


More information about the llvm-commits mailing list