summaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2017-11-18 04:28:59 +0000
committerQuentin Colombet <qcolombet@apple.com>2017-11-18 04:28:59 +0000
commit5f15b7e6c3d5caa54694724f27733a8c27667bd2 (patch)
treeec35121a6143c77d445482103702439c28ec3d90 /test/CodeGen/AArch64
parent7bf447e9beec281d34b044f19f1d391a0d650585 (diff)
[AArch64] Map G_LOAD on FPR when the definition goes to a copy to FPR
We used to detect loads feeding fp instructions, but we were failing to take into account cases where this happens through copies. For instance, loads can fed copies coming from the ABI lowering of floating point arguments/results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/AArch64')
-rw-r--r--test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir b/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
index aace553af2d..a27cf2bea78 100644
--- a/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
+++ b/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
@@ -917,7 +917,7 @@ body: |
# CHECK: registers:
# CHECK: - { id: 0, class: fpr, preferred-register: '' }
# CHECK: - { id: 1, class: gpr, preferred-register: '' }
-# CHECK: - { id: 2, class: gpr, preferred-register: '' }
+# CHECK: - { id: 2, class: fpr, preferred-register: '' }
#
# CHECK: %0:fpr(s16) = COPY %h0
# CHECK-NEXT: %1:gpr(p0) = G_FRAME_INDEX %stack.0.p.addr
@@ -925,7 +925,10 @@ body: |
# would have been on GPR and we would have to insert a copy to move
# the value away from FPR (h0).
# CHECK-NEXT: G_STORE %0(s16), %1(p0) :: (store 2 into %ir.p.addr)
-# CHECK-NEXT: %2:gpr(s16) = G_LOAD %1(p0) :: (load 2 from %ir.p.addr)
+# If we didn't look through the copy for %2, the default mapping
+# would have been on GPR and we would have to insert a copy to move
+# the value to FPR (h0).
+# CHECK-NEXT: %2:fpr(s16) = G_LOAD %1(p0) :: (load 2 from %ir.p.addr)
# CHECK-NEXT: %h0 = COPY %2(s16)
name: passFp16ViaAllocas
alignment: 2