; 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
-# 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 }
- { 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
- { 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
; 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
--- |
; 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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
--- |
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
set(LLVM_LINK_COMPONENTS
GlobalISel
+ CodeGen
)
if(LLVM_BUILD_GLOBAL_ISEL)