summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll
diff options
context:
space:
mode:
authorStefan Pintilie <stefanp@ca.ibm.com>2018-01-09 21:57:49 +0000
committerStefan Pintilie <stefanp@ca.ibm.com>2018-01-09 21:57:49 +0000
commit1712700842c03afcb9c3c758f95fa039f912ec02 (patch)
tree222860eb62ec863f4181b52c3e9bb27523416dc0 /llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll
parent07657a8d7faf7cf255858485453ed1e5a1bdc5cd (diff)
downloadbcm5719-llvm-1712700842c03afcb9c3c758f95fa039f912ec02.tar.gz
bcm5719-llvm-1712700842c03afcb9c3c758f95fa039f912ec02.zip
[PowerPC] Manually schedule the prologue and epilogue
This patch makes the following changes to the schedule of instructions in the prologue and epilogue. The stack pointer update is moved down in the prologue so that the callee saves do not have to wait for the update to happen. Saving the lr is moved down in the prologue to hide the latency of the mflr. The stack pointer is moved up in the epilogue so that restoring of the lr can happen sooner. The mtlr is moved up in the epilogue so that it is away form the blr at the end of the epilogue. The latency of the mtlr can now be hidden by the loads of the callee saved registers. This commit is almost identical to this one: r322036 except that two warnings that broke build bots have been fixed. The revision number is D41737 as before. llvm-svn: 322124
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll50
1 files changed, 26 insertions, 24 deletions
diff --git a/llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll b/llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll
index 92427f5ccde..b02c8aeba17 100644
--- a/llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll
+++ b/llvm/test/CodeGen/PowerPC/vsxD-Form-spills.ll
@@ -4,35 +4,37 @@
define <4 x i32> @testSpill(<4 x i32> %a, <4 x i32> %b) {
; CHECK-LABEL: testSpill:
-; CHECK: li 11, 80
-; CHECK: li 12, 96
-; CHECK: li 3, 48
-; CHECK: li 10, 64
-; CHECK: stxvd2x 62, 1, 11 # 16-byte Folded Spill
-; CHECK: stxvd2x 63, 1, 12 # 16-byte Folded Spill
-; CHECK: stxvd2x 60, 1, 3 # 16-byte Folded Spill
-; CHECK: stxvd2x 61, 1, 10 # 16-byte Folded Spill
-; CHECK: li 9, 96
-; CHECK: li 10, 80
-; CHECK: li 11, 64
-; CHECK: li 12, 48
-; CHECK: lxvd2x 63, 1, 9 # 16-byte Folded Reload
-; CHECK: lxvd2x 62, 1, 10 # 16-byte Folded Reload
-; CHECK: lxvd2x 61, 1, 11 # 16-byte Folded Reload
-; CHECK: lxvd2x 60, 1, 12 # 16-byte Folded Reload
+; CHECK-DAG: li [[REG64:[0-9]+]], -64
+; CHECK-DAG: li [[REG48:[0-9]+]], -48
+; CHECK-DAG: li [[REG32:[0-9]+]], -32
+; CHECK-DAG: li [[REG16:[0-9]+]], -16
+; CHECK-NOT: li
+; CHECK-DAG: stxvd2x 60, 1, [[REG64]] # 16-byte Folded Spill
+; CHECK-DAG: stxvd2x 61, 1, [[REG48]] # 16-byte Folded Spill
+; CHECK-DAG: stxvd2x 62, 1, [[REG32]] # 16-byte Folded Spill
+; CHECK-DAG: stxvd2x 63, 1, [[REG16]] # 16-byte Folded Spill
+; CHECK: std 0, 16(1)
+; CHECK-DAG: li [[REG16:[0-9]+]], -16
+; CHECK-DAG: li [[REG32:[0-9]+]], -32
+; CHECK-DAG: li [[REG48:[0-9]+]], -48
+; CHECK-DAG: li [[REG64:[0-9]+]], -64
; CHECK: mtlr 0
+; CHECK-DAG: lxvd2x 63, 1, [[REG16]] # 16-byte Folded Reload
+; CHECK-DAG: lxvd2x 62, 1, [[REG32]] # 16-byte Folded Reload
+; CHECK-DAG: lxvd2x 61, 1, [[REG48]] # 16-byte Folded Reload
+; CHECK-DAG: lxvd2x 60, 1, [[REG64]] # 16-byte Folded Reload
; CHECK-NEXT: blr
;
; CHECK-PWR9-LABEL: testSpill:
-; CHECK-PWR9: stxv 62, 80(1) # 16-byte Folded Spill
-; CHECK-PWR9: stxv 63, 96(1) # 16-byte Folded Spill
-; CHECK-PWR9: stxv 60, 48(1) # 16-byte Folded Spill
-; CHECK-PWR9: stxv 61, 64(1) # 16-byte Folded Spill
-; CHECK-PWR9: lxv 63, 96(1) # 16-byte Folded Reload
-; CHECK-PWR9: lxv 62, 80(1) # 16-byte Folded Reload
-; CHECK-PWR9: lxv 61, 64(1) # 16-byte Folded Reload
-; CHECK-PWR9: lxv 60, 48(1) # 16-byte Folded Reload
+; CHECK-PWR9-DAG: stxv 60, -64(1) # 16-byte Folded Spill
+; CHECK-PWR9-DAG: stxv 61, -48(1) # 16-byte Folded Spill
+; CHECK-PWR9-DAG: stxv 62, -32(1) # 16-byte Folded Spill
+; CHECK-PWR9-DAG: stxv 63, -16(1) # 16-byte Folded Spill
; CHECK-PWR9: mtlr 0
+; CHECK-PWR9-DAG: lxv 63, -16(1) # 16-byte Folded Reload
+; CHECK-PWR9-DAG: lxv 62, -32(1) # 16-byte Folded Reload
+; CHECK-PWR9-DAG: lxv 61, -48(1) # 16-byte Folded Reload
+; CHECK-PWR9-DAG: lxv 60, -64(1) # 16-byte Folded Reload
; CHECK-PWR9-NEXT: blr
entry:
OpenPOWER on IntegriCloud