[llvm] 98797a5 - [PrologEpilogInserter][test] Improve SpilledToReg test
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 17 20:37:15 PDT 2020
Author: Fangrui Song
Date: 2020-10-17T20:36:22-07:00
New Revision: 98797a5fc06c1e4885acf513d9254f285aeceeb8
URL: https://github.com/llvm/llvm-project/commit/98797a5fc06c1e4885acf513d9254f285aeceeb8
DIFF: https://github.com/llvm/llvm-project/commit/98797a5fc06c1e4885acf513d9254f285aeceeb8.diff
LOG: [PrologEpilogInserter][test] Improve SpilledToReg test
D39386 made CalleeSavedInfo possible to spill a register to another register
(vector register for POWER9) but did not actually test live-in.
Added:
Modified:
llvm/test/CodeGen/PowerPC/prolog_vec_spills.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/PowerPC/prolog_vec_spills.mir b/llvm/test/CodeGen/PowerPC/prolog_vec_spills.mir
index ddd459044cdb..9803b226b43c 100644
--- a/llvm/test/CodeGen/PowerPC/prolog_vec_spills.mir
+++ b/llvm/test/CodeGen/PowerPC/prolog_vec_spills.mir
@@ -16,6 +16,7 @@ body: |
# CHECK-LABEL: name: test1BB
# CHECK: body: |
+# CHECK: liveins: $x14, $x15, $x16, $v20
# CHECK: $f1 = MTVSRD killed $x14
# CHECK-NEXT: $f2 = MTVSRD killed $x15
# CHECK-NEXT: $f3 = MTVSRD killed $x16
@@ -50,12 +51,19 @@ body: |
bb.3:
BLR8 implicit undef $lr8, implicit undef $rm
+## The spilled-to registers have to be marked as live-in so that they will not be
+## clobbered before restored in the epilogue.
# CHECK-LABEL: name: test2BB
# CHECK: body: |
-# CHECK: $f0 = MTVSRD killed $x14
-# CHECK-NEXT: $f1 = MTVSRD killed $x15
-# CHECK-NEXT: $f2 = MTVSRD killed $x16
-# CHECK: $x16 = MFVSRD killed $f2
-# CHECK-NEXT: $x15 = MFVSRD killed $f1
-# CHECK-NEXT: $x14 = MFVSRD killed $f0
+# CHECK: $f0 = MTVSRD killed $x14
+# CHECK-NEXT: $f1 = MTVSRD killed $x15
+# CHECK-NEXT: $f2 = MTVSRD killed $x16
+# CHECK: bb.2:
+# CHECK-NEXT: successors: %bb.3
+# CHECK-NEXT: liveins: $f0, $f1, $f2
+# CHECK: bb.3:
+# CHECK-NEXT: liveins: $f0, $f1, $f2
+# CHECK: $x16 = MFVSRD killed $f2
+# CHECK-NEXT: $x15 = MFVSRD killed $f1
+# CHECK-NEXT: $x14 = MFVSRD killed $f0
...
More information about the llvm-commits
mailing list