[llvm] r265811 - [AArch64] Add a test case for the default mapping of RegBankSelect.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 8 10:11:52 PDT 2016
Author: qcolombet
Date: Fri Apr 8 12:11:51 2016
New Revision: 265811
URL: http://llvm.org/viewvc/llvm-project?rev=265811&view=rev
Log:
[AArch64] Add a test case for the default mapping of RegBankSelect.
Added:
llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
Added: llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir?rev=265811&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir (added)
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir Fri Apr 8 12:11:51 2016
@@ -0,0 +1,49 @@
+# RUN: llc -O0 -run-pass=regbankselect -global-isel %s -o - 2>&1 | FileCheck %s
+# REQUIRES: global-isel
+
+--- |
+ ; ModuleID = 'generic-virtual-registers-type-error.mir'
+ target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
+ target triple = "aarch64-apple-ios"
+ define void @defaultMapping() {
+ entry:
+ ret void
+ }
+ define void @defaultMappingVector() {
+ entry:
+ ret void
+ }
+...
+
+---
+# Check that we assign a relevant register bank for %0.
+# Based on the type i32, this should be gpr.
+name: defaultMapping
+isSSA: true
+# CHECK: registers:
+# CHECK-NEXT: - { id: 0, class: gpr }
+registers:
+ - { id: 0, class: _ }
+body: |
+ bb.0.entry:
+ liveins: %x0
+ ; CHECK: %0(32) = G_ADD i32 %x0
+ %0(32) = G_ADD i32 %x0, %x0
+...
+
+---
+# Check that we assign a relevant register bank for %0.
+# Based on the type <2 x i32>, this should be fpr.
+# FPR is used for both floating point and vector registers.
+name: defaultMappingVector
+isSSA: true
+# CHECK: registers:
+# CHECK-NEXT: - { id: 0, class: fpr }
+registers:
+ - { id: 0, class: _ }
+body: |
+ bb.0.entry:
+ liveins: %d0
+ ; CHECK: %0(32) = G_ADD <2 x i32> %d0
+ %0(32) = G_ADD <2 x i32> %d0, %d0
+...
More information about the llvm-commits
mailing list