]> granicus.if.org Git - llvm/commitdiff
[GlobalISel] Get the AArch64 tests to work on Linux
authorDiana Picus <diana.picus@linaro.org>
Fri, 14 Oct 2016 10:19:40 +0000 (10:19 +0000)
committerDiana Picus <diana.picus@linaro.org>
Fri, 14 Oct 2016 10:19:40 +0000 (10:19 +0000)
Mostly this just means changing the triple from aarch64-apple-ios to the generic
aarch64--. Only one test needs more significant changes, but GlobalISel already
does the right thing so it's ok to just change the checks.

Differential Revision: https://reviews.llvm.org/D25532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284223 91177308-0d34-0410-b5e6-96231b3b80d8

21 files changed:
test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
test/CodeGen/AArch64/GlobalISel/arm64-instructionselect.mir
test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
test/CodeGen/AArch64/GlobalISel/legalize-add.mir
test/CodeGen/AArch64/GlobalISel/legalize-and.mir
test/CodeGen/AArch64/GlobalISel/legalize-cmp.mir
test/CodeGen/AArch64/GlobalISel/legalize-combines.mir
test/CodeGen/AArch64/GlobalISel/legalize-constant.mir
test/CodeGen/AArch64/GlobalISel/legalize-div.mir
test/CodeGen/AArch64/GlobalISel/legalize-ext.mir
test/CodeGen/AArch64/GlobalISel/legalize-fcmp.mir
test/CodeGen/AArch64/GlobalISel/legalize-gep.mir
test/CodeGen/AArch64/GlobalISel/legalize-load-store.mir
test/CodeGen/AArch64/GlobalISel/legalize-mul.mir
test/CodeGen/AArch64/GlobalISel/legalize-or.mir
test/CodeGen/AArch64/GlobalISel/legalize-rem.mir
test/CodeGen/AArch64/GlobalISel/legalize-simple.mir
test/CodeGen/AArch64/GlobalISel/legalize-sub.mir
test/CodeGen/AArch64/GlobalISel/legalize-xor.mir
unittests/CodeGen/GlobalISel/CMakeLists.txt

index 5a42ca6b1ab4f72a1a00b3e53a4c645484136261..d9e8004ceb56f63ad7ca717c0132d629a5141d00 100644 (file)
@@ -8,15 +8,17 @@
 ; the fallback path.
 
 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-target triple = "aarch64-apple-ios"
+target triple = "aarch64--"
 
+; We use __fixunstfti as the common denominator for __fixunstfti on Linux and
+; ___fixunstfti on iOS
 ; ERROR: Unable to lower arguments
 ; FALLBACK: ldr q0,
-; FALLBACK-NEXT: bl ___fixunstfti
+; FALLBACK-NEXT: bl __fixunstfti
 ;
 ; FALLBACK_WITH_REPORT: warning: Instruction selection used fallback path for ABIi128
 ; FALLBACK_WITH_REPORT: ldr q0,
-; FALLBACK_WITH_REPORT-NEXT: bl ___fixunstfti
+; FALLBACK_WITH_REPORT-NEXT: bl __fixunstfti
 define i128 @ABIi128(i128 %arg1) {
   %farg1 =       bitcast i128 %arg1 to fp128 
   %res = fptoui fp128 %farg1 to i128
index d60fb940fb6e8a2743ccf81f8b7a273b6ab87376..afe71cc3ff0bcef90d805a0435f24ab492f82a07 100644 (file)
@@ -1,11 +1,12 @@
-# RUN: llc -O0 -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s
+# RUN: llc -O0 -mtriple=aarch64-apple-ios -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=IOS
+# RUN: llc -O0 -mtriple=aarch64-linux-gnu -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=LINUX-DEFAULT
+# RUN: llc -O0 -mtriple=aarch64-linux-gnu -relocation-model=pic -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=LINUX-PIC
 
 # Test the instruction selector.
 # As we support more instructions, we need to split this up.
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
 
   define void @add_s32_gpr() { ret void }
   define void @add_s64_gpr() { ret void }
@@ -1748,7 +1749,9 @@ registers:
   - { id: 0, class: gpr }
 
 # CHECK:  body:
-# CHECK: %0 = MOVaddr target-flags(aarch64-page) @var_local, target-flags(aarch64-pageoff, aarch64-nc) @var_local
+# IOS: %0 = MOVaddr target-flags(aarch64-page) @var_local, target-flags(aarch64-pageoff, aarch64-nc) @var_local
+# LINUX-DEFAULT: %0 = MOVaddr target-flags(aarch64-page) @var_local, target-flags(aarch64-pageoff, aarch64-nc) @var_local
+# LINUX-PIC: %0 = LOADgot @var_local
 body:             |
   bb.0:
     %0(p0) = G_GLOBAL_VALUE @var_local
@@ -1763,7 +1766,9 @@ registers:
   - { id: 0, class: gpr }
 
 # CHECK:  body:
-# CHECK: %0 = LOADgot @var_got
+# IOS: %0 = LOADgot @var_got
+# LINUX-DEFAULT: %0 = MOVaddr target-flags(aarch64-page) @var_got, target-flags(aarch64-pageoff, aarch64-nc) @var_got
+# LINUX-PIC: %0 = LOADgot @var_got
 body:             |
   bb.0:
     %0(p0) = G_GLOBAL_VALUE @var_got
index 24276570581f01f83a05e465a93cae754c873dac..2b20d1609e5ed373412d89fd82002b9e15eb6b4e 100644 (file)
@@ -3,7 +3,7 @@
 ; This file checks that the translation from llvm IR to generic MachineInstr
 ; is correct.
 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-target triple = "aarch64-apple-ios"
+target triple = "aarch64--"
 
 ; Tests for add.
 ; CHECK-LABEL: name: addi64
index 02b12da7abda1d2432eb38b8ef3a9a9983b85b53..881df5a124abfe09e940504af306a32a338de6bb 100644 (file)
@@ -4,7 +4,7 @@
 --- |
   ; ModuleID = 'generic-virtual-registers-type-error.mir'
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @defaultMapping() {
   entry:
     ret void
index 9121ec704e54d4061f0d8dd75c6e29c75762913e..6bd1aa1b3c817afe89ce1e99fdba68209253432a 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_scalar_add_big() {
   entry:
     ret void
index 0c4ce1ab355fffc99dead526af82d452c3a415ac..92f8f553e61a464731ed07b9c6830b95ccdfb00e 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_scalar_and_small() {
   entry:
     ret void
index f8a8c3284dea072c2118726dde847cce6a794934..0ed367f4fb4b111d6770a11670ce341a08e27ff2 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_icmp() {
   entry:
     ret void
index 8221325d952f1a912c2dc27df1d5a948f6f3d415..fc39705d46ab7a879ea0a5b0cc6a1ac81c7f5c53 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_combines() {
   entry:
     ret void
index 74a82e24d5f69b03891474c1824224041b99caf0..1bdf43dd33fdc1744325cab670f7aa000445ab1d 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_constant() {
   entry:
     ret void
index 363628daf6a10cf6fca31132c819c3932be7b9e7..f3da2cbf1296c2c8e931ab1a27428eb49a1bf69b 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_div() {
   entry:
     ret void
index 3037cd4271bac9edc8b87381ce99bb08d86486f2..a82656106057ca2f4f2ec762e9411a2a110120af 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_ext() {
   entry:
     ret void
index e051b8e6b201057925e47138327ad3f81783aae3..3e1722c46c984037bcdf1b8a5a12fa10b7a401cd 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_icmp() {
   entry:
     ret void
index 4ae441e34d537abfc7f535a5dfc4edc4ef16e393..8a038f52ea1d95ba48d29021120869d078f57c8a 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_gep_small() {
   entry:
     ret void
index 138435765e41cf93ffbf9bc912c1c83253d05003..2ecb8d5abccf1a9043910337f9741adce9587331 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_load(i8* %addr) {
   entry:
     ret void
index b4a054907d5fa9f8c4aa0770b562b603770f35cd..2c5c4c85cb1633eba8bd2b8529b6c28be5e4f1b6 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_scalar_mul_small() {
   entry:
     ret void
index a15ad4cf950b4d3f30b597a51df22042ff63f16d..93a1d68a8a4a64fd3f7f31d6c72fee3f526e935d 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_scalar_or_small() {
   entry:
     ret void
index 4691ac51ea5623004e167f467f7cf0343cfd3003..b2584e5ce05b15cf62998e13b4a7f358858159a4 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_rem() {
   entry:
     ret void
index 97a31d365772a2c6b70a5b8828726a0789a7d38a..c4968a9cb31b8335259663370fe22d0cb815a8f8 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_simple() {
   entry:
     ret void
index 94363c153e92a05d9771ac15f456af678b5448be..c657bc3ae664bd217f4a70190d729b75a7b58a2a 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_scalar_sub_small() {
   entry:
     ret void
index f626033391a251b6e989a590c506b6d714a27569..6325fbd92970926fcf37ca836df3cb0e4261b4d5 100644 (file)
@@ -2,7 +2,7 @@
 
 --- |
   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-  target triple = "aarch64-apple-ios"
+  target triple = "aarch64--"
   define void @test_scalar_xor_small() {
   entry:
     ret void
index 8a1d5ccfdac59ad5c106b2166d89a77ebfe50a66..1669835f2626fbb4b49be2ca503e7eebe8972200 100644 (file)
@@ -1,5 +1,6 @@
 set(LLVM_LINK_COMPONENTS
   GlobalISel
+  CodeGen
   )
 
 if(LLVM_BUILD_GLOBAL_ISEL)