]> granicus.if.org Git - llvm/commitdiff
[ARM] GlobalISel: Test default banks for load results. NFC.
authorDiana Picus <diana.picus@linaro.org>
Thu, 2 Feb 2017 13:00:24 +0000 (13:00 +0000)
committerDiana Picus <diana.picus@linaro.org>
Thu, 2 Feb 2017 13:00:24 +0000 (13:00 +0000)
Check that all scalars are loaded into the GPR by default.

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

test/CodeGen/ARM/GlobalISel/arm-regbankselect.mir

index 64c65a41a31d35bda064ea969b68a15ea72c12c7..d520750ba309f7e0608f774a83d3348daf0f3e92 100644 (file)
@@ -4,6 +4,8 @@
   define void @test_add_s16() { ret void }
   define void @test_add_s8() { ret void }
   define void @test_add_s1() { ret void }
+
+  define void @test_loads() { ret void }
 ...
 ---
 name:            test_add_s32
@@ -109,3 +111,33 @@ body:             |
     BX_RET 14, _, implicit %r0
 
 ...
+---
+name:            test_loads
+# CHECK-LABEL: name: test_loads
+legalized:       true
+regBankSelected: false
+selected:        false
+# CHECK: registers:
+# CHECK: - { id: 0, class: gprb }
+# CHECK: - { id: 1, class: gprb }
+# CHECK: - { id: 2, class: gprb }
+# CHECK: - { id: 3, class: gprb }
+# CHECK: - { id: 4, class: gprb }
+
+registers:
+  - { id: 0, class: _ }
+  - { id: 1, class: _ }
+  - { id: 2, class: _ }
+  - { id: 3, class: _ }
+  - { id: 4, class: _ }
+body:             |
+  bb.0:
+    liveins: %r0
+    %0(p0) = COPY %r0
+    %1(s32) = G_LOAD %0
+    %2(s16) = G_LOAD %0
+    %3(s8)  = G_LOAD %0
+    %4(s1)  = G_LOAD %0
+    BX_RET 14, _, implicit %r0
+
+...