// As a top-level guess, vectors go in FPRs, scalars and pointers in GPRs.
// For floating-point instructions, scalars go in FPRs.
- if (Ty.isVector() || isPreISelGenericFloatingPointOpcode(Opc))
+ if (Ty.isVector() || isPreISelGenericFloatingPointOpcode(Opc) ||
+ Ty.getSizeInBits() > 64)
OpRegBankIdx[Idx] = PMI_FirstFPR;
else
OpRegBankIdx[Idx] = PMI_FirstGPR;
ret void
}
- ; RegBankSelect crashed when given invalid mappings, and AArch64's
- ; implementation produce valid-but-nonsense mappings for G_SEQUENCE.
-; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to map instruction
-; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for sequence_mapping
-; FALLBACK-WITH-REPORT-OUT-LABEL: sequence_mapping:
-define void @sequence_mapping([2 x i64] %in) {
- ret void
-}
-
- ; Legalizer was asserting when it enountered an unexpected default action.
-; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to map instruction
-; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for legal_default
-; FALLBACK-WITH-REPORT-LABEL: legal_default:
-define void @legal_default([8 x i8] %in) {
- insertvalue { [4 x i8], [8 x i8], [4 x i8] } undef, [8 x i8] %in, 1
- ret void
-}
-
; AArch64 was asserting instead of returning an invalid mapping for unknown
; sizes.
; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to translate instruction: ret: ' ret i128 undef' (in function: sequence_sizes)
--- /dev/null
+# RUN: llc -mtriple=aarch64 -global-isel -run-pass=regbankselect -o - %s | FileCheck %s
+---
+name: test_large_merge
+legalized: true
+registers:
+body: |
+ bb.0.entry:
+ liveins: %x0, %x1, %x2
+
+ ; CHECK-LABEL: name: test_large_merge
+ ; CHECK: registers:
+ ; CHECK: - { id: 0, class: gpr
+ ; CHECK: - { id: 1, class: gpr
+ ; CHECK: - { id: 2, class: gpr
+ ; CHECK: - { id: 3, class: fpr
+ %0:_(s64) = COPY %x0
+ %1:_(s64) = COPY %x1
+ %2:_(p0) = COPY %x2
+ %3:_(s128) = G_MERGE_VALUES %0, %1
+ %d0 = COPY %3
+...