[SystemZ] Allocate a second register scavenging slot

This is another prerequisite for frame-to-frame MVC copies.
I'll commit the patch that makes use of the slot separately.

The downside of trying to test many corner cases with each of the
available addressing modes is that a fair few tests need to account
for the new frame layout.  I do still think it's useful to have all
these tests though, since it's something that wouldn't get much coverage
otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Sandiford
2013-07-05 13:11:52 +00:00
parent 61de142984
commit 47734db936
9 changed files with 314 additions and 310 deletions

View File

@@ -5,9 +5,9 @@
; Test a frame size that requires some FPRs to be saved and loaded using
; the 20-bit STDY and LDY while others can use the 12-bit STD and LD.
; The frame is big enough to require an emergency spill slot at 160(%r15),
; The frame is big enough to require two emergency spill slots at 160(%r15),
; as well as the 8 FPR save slots. Get a frame of size 4128 by allocating
; (4128 - 168 - 8 * 8) / 8 = 487 extra doublewords.
; (4128 - 176 - 8 * 8) / 8 = 486 extra doublewords.
define void @f1(double *%ptr, i64 %x) {
; CHECK-NOFP: f1:
; CHECK-NOFP: aghi %r15, -4128
@@ -65,8 +65,8 @@ define void @f1(double *%ptr, i64 %x) {
; CHECK-FP: ld %f15, 4064(%r11)
; CHECK-FP: lmg %r11, %r15, 4216(%r11)
; CHECK-FP: br %r14
%y = alloca [487 x i64], align 8
%elem = getelementptr inbounds [487 x i64]* %y, i64 0, i64 0
%y = alloca [486 x i64], align 8
%elem = getelementptr inbounds [486 x i64]* %y, i64 0, i64 0
store volatile i64 %x, i64* %elem
%l0 = load volatile double *%ptr
%l1 = load volatile double *%ptr
@@ -127,7 +127,7 @@ define void @f1(double *%ptr, i64 %x) {
; good optimisation but is really a different test.
;
; As above, get a frame of size 524320 by allocating
; (524320 - 168 - 8 * 8) / 8 = 65511 extra doublewords.
; (524320 - 176 - 8 * 8) / 8 = 65510 extra doublewords.
define void @f2(double *%ptr, i64 %x) {
; CHECK-NOFP: f2:
; CHECK-NOFP: agfi %r15, -524320
@@ -194,8 +194,8 @@ define void @f2(double *%ptr, i64 %x) {
; CHECK-FP: aghi %r11, 128
; CHECK-FP: lmg %r11, %r15, 524280(%r11)
; CHECK-FP: br %r14
%y = alloca [65511 x i64], align 8
%elem = getelementptr inbounds [65511 x i64]* %y, i64 0, i64 0
%y = alloca [65510 x i64], align 8
%elem = getelementptr inbounds [65510 x i64]* %y, i64 0, i64 0
store volatile i64 %x, i64* %elem
%l0 = load volatile double *%ptr
%l1 = load volatile double *%ptr