llvm-6502/test/CodeGen/SystemZ
Richard Sandiford 5f1c7e5eac Fix double renaming bug in stack coloring pass
The stack coloring pass renumbered frame indexes with a loop of the form:

  for each frame index FI
    for each instruction I that uses FI
      for each use of FI in I
        rename FI to FI'

This caused problems if an instruction used two frame indexes F0 and F1
and if F0 was renamed to F1 and F1 to F2.  The first time we visited the
instruction we changed F0 to F1, then we changed both F1s to F2.

In other words, the problem was that SSRefs recorded which instructions
used an FI, but not which MachineOperands and MachineMemOperands within
that instruction used it.

This is easily fixed for MachineOperands by walking the instructions
once and processing each operand in turn.  There's already a loop to
do that for dead store elimination, so it seemed more efficient to
fuse the two at the block level.

MachineMemOperands are more tricky because they can be shared between
instructions.  The patch handles them by making SSRefs an array of
MachineMemOperands rather than an array of MachineInstrs.  We might end
up processing the same MachineMemOperand twice, but that's OK because
we always know from the SSRefs index what the original frame index was.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185703 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-05 14:24:47 +00:00
..
Large [SystemZ] Enable the use of MVC for frame-to-frame spills 2013-07-05 14:02:01 +00:00
addr-01.ll
addr-02.ll
addr-03.ll
alloca-01.ll
alloca-02.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
and-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
and-02.ll
and-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
and-04.ll
and-05.ll
and-06.ll
args-01.ll [SystemZ] Allow immediate moves to be rematerialized 2013-06-27 09:38:48 +00:00
args-02.ll [SystemZ] Allow immediate moves to be rematerialized 2013-06-27 09:38:48 +00:00
args-03.ll [SystemZ] Allow immediate moves to be rematerialized 2013-06-27 09:38:48 +00:00
args-04.ll
args-05.ll
args-06.ll
asm-01.ll
asm-02.ll
asm-03.ll
asm-04.ll
asm-05.ll
asm-06.ll
asm-07.ll
asm-08.ll
asm-09.ll
asm-10.ll
asm-11.ll
asm-12.ll
asm-13.ll
asm-14.ll
asm-15.ll
asm-16.ll
atomic-load-01.ll
atomic-load-02.ll
atomic-load-03.ll
atomic-load-04.ll
atomic-store-01.ll
atomic-store-02.ll
atomic-store-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomic-store-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-add-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-add-02.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-add-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-add-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-and-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-and-02.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-and-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-and-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-minmax-01.ll [SystemZ] Register compare-and-branch support 2013-05-28 10:41:11 +00:00
atomicrmw-minmax-02.ll [SystemZ] Register compare-and-branch support 2013-05-28 10:41:11 +00:00
atomicrmw-minmax-03.ll [SystemZ] Allow immediate moves to be rematerialized 2013-06-27 09:38:48 +00:00
atomicrmw-minmax-04.ll [SystemZ] Allow immediate moves to be rematerialized 2013-06-27 09:38:48 +00:00
atomicrmw-nand-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-nand-02.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-nand-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-nand-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-or-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-or-02.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-or-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-or-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-sub-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-sub-02.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-sub-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-sub-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xchg-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xchg-02.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xchg-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xchg-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xor-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xor-02.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xor-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
atomicrmw-xor-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
branch-01.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
branch-02.ll [SystemZ] Register compare-and-branch support 2013-05-28 10:41:11 +00:00
branch-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
branch-04.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
branch-05.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
branch-06.ll [SystemZ] Fix some embarrassing test typos 2013-06-27 09:49:34 +00:00
branch-07.ll [SystemZ] Fix some embarrassing test typos 2013-06-27 09:49:34 +00:00
bswap-01.ll [SystemZ] Fix some embarrassing test typos 2013-06-27 09:49:34 +00:00
bswap-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
bswap-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
bswap-04.ll [SystemZ] Don't use LOAD and STORE REVERSED for volatile accesses 2013-05-31 13:25:22 +00:00
bswap-05.ll [SystemZ] Don't use LOAD and STORE REVERSED for volatile accesses 2013-05-31 13:25:22 +00:00
call-01.ll
call-02.ll
cmpxchg-01.ll [SystemZ] Register compare-and-branch support 2013-05-28 10:41:11 +00:00
cmpxchg-02.ll [SystemZ] Register compare-and-branch support 2013-05-28 10:41:11 +00:00
cmpxchg-03.ll
cmpxchg-04.ll
cond-store-01.ll [SystemZ] Add conditional store patterns 2013-06-27 09:27:40 +00:00
cond-store-02.ll [SystemZ] Add conditional store patterns 2013-06-27 09:27:40 +00:00
cond-store-03.ll [SystemZ] Add conditional store patterns 2013-06-27 09:27:40 +00:00
cond-store-04.ll [SystemZ] Add conditional store patterns 2013-06-27 09:27:40 +00:00
cond-store-05.ll [SystemZ] Add conditional store patterns 2013-06-27 09:27:40 +00:00
cond-store-06.ll [SystemZ] Add conditional store patterns 2013-06-27 09:27:40 +00:00
fp-abs-01.ll
fp-abs-02.ll
fp-add-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-add-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-add-03.ll
fp-cmp-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-cmp-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-cmp-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
fp-const-01.ll
fp-const-02.ll
fp-const-03.ll
fp-const-04.ll
fp-const-05.ll
fp-const-06.ll
fp-const-07.ll
fp-const-08.ll
fp-const-09.ll
fp-conv-01.ll
fp-conv-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-conv-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-conv-04.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-conv-05.ll
fp-conv-06.ll
fp-conv-07.ll
fp-conv-08.ll [SystemZ] Fix some embarrassing test typos 2013-06-27 09:49:34 +00:00
fp-conv-09.ll
fp-conv-10.ll
fp-conv-11.ll
fp-conv-12.ll
fp-copysign-01.ll
fp-div-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-div-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-div-03.ll
fp-move-01.ll
fp-move-02.ll
fp-move-03.ll
fp-move-04.ll
fp-move-05.ll
fp-move-06.ll
fp-move-07.ll
fp-move-08.ll
fp-mul-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-mul-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-mul-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-mul-04.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-mul-05.ll
fp-mul-06.ll
fp-mul-07.ll
fp-mul-08.ll
fp-mul-09.ll
fp-neg-01.ll
fp-round-01.ll
fp-sqrt-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-sqrt-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-sqrt-03.ll
fp-sub-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-sub-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
fp-sub-03.ll
frame-01.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-02.ll
frame-03.ll
frame-04.ll
frame-05.ll
frame-06.ll
frame-07.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-08.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-09.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-10.ll
frame-11.ll
frame-13.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-14.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-15.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-16.ll [SystemZ] Allocate a second register scavenging slot 2013-07-05 13:11:52 +00:00
frame-17.ll
frame-18.ll
insert-01.ll
insert-02.ll
insert-03.ll
insert-04.ll
insert-05.ll
insert-06.ll
int-add-01.ll
int-add-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-add-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-add-04.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-add-05.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-add-06.ll
int-add-07.ll
int-add-08.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-add-09.ll
int-add-10.ll
int-add-11.ll
int-add-12.ll
int-cmp-01.ll
int-cmp-02.ll [SystemZ] Register compare-and-branch support 2013-05-28 10:41:11 +00:00
int-cmp-03.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-04.ll
int-cmp-05.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-cmp-06.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-cmp-07.ll [SystemZ] Register compare-and-branch support 2013-05-28 10:41:11 +00:00
int-cmp-08.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-09.ll [SystemZ] Immediate compare-and-branch support 2013-05-29 11:58:52 +00:00
int-cmp-10.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-11.ll [SystemZ] Immediate compare-and-branch support 2013-05-29 11:58:52 +00:00
int-cmp-12.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-13.ll [SystemZ] Immediate compare-and-branch support 2013-05-29 11:58:52 +00:00
int-cmp-14.ll [SystemZ] Immediate compare-and-branch support 2013-05-29 11:58:52 +00:00
int-cmp-15.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-16.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-17.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-18.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-19.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-20.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-21.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-22.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-23.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-24.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-25.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-26.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-27.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-28.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-29.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-30.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-31.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-32.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-33.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-34.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-35.ll [SystemZ] Tighten branch tests 2013-05-21 08:53:17 +00:00
int-cmp-36.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-cmp-37.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-cmp-38.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-cmp-39.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-cmp-40.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-cmp-41.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-cmp-42.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-cmp-43.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-const-01.ll [SystemZ] Allow immediate moves to be rematerialized 2013-06-27 09:38:48 +00:00
int-const-02.ll [SystemZ] Allow immediate moves to be rematerialized 2013-06-27 09:38:48 +00:00
int-const-03.ll
int-const-04.ll
int-const-05.ll
int-const-06.ll
int-conv-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-04.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-05.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-06.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-07.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-08.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-09.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-conv-10.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-div-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-div-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-div-03.ll [SystemZ] Use DSGFR over DSGR in more cases 2013-07-02 15:40:22 +00:00
int-div-04.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-div-05.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-move-01.ll
int-move-02.ll
int-move-03.ll
int-move-04.ll
int-move-05.ll
int-move-06.ll
int-move-07.ll
int-move-08.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-move-09.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
int-mul-01.ll
int-mul-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-mul-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-mul-04.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-mul-05.ll
int-mul-06.ll
int-mul-07.ll
int-mul-08.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-neg-01.ll
int-sub-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-sub-02.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-sub-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-sub-04.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-sub-05.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
int-sub-06.ll
int-sub-07.ll
la-01.ll [SystemZ] Allow LA and LARL to be rematerialized 2013-06-27 09:42:10 +00:00
la-02.ll
la-03.ll
la-04.ll
lit.local.cfg
or-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
or-02.ll
or-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
or-04.ll [SystemZ] Add CodeGen test cases 2013-05-06 16:17:29 +00:00
or-05.ll
or-06.ll
shift-01.ll
shift-02.ll
shift-03.ll
shift-04.ll
shift-05.ll
shift-06.ll
shift-07.ll
shift-08.ll
spill-01.ll Fix double renaming bug in stack coloring pass 2013-07-05 14:24:47 +00:00
tls-01.ll
unaligned-01.ll [SystemZ] Enable unaligned accesses 2013-05-30 09:45:42 +00:00
xor-01.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
xor-02.ll
xor-03.ll [SystemZ] Fold more spills 2013-07-03 10:10:02 +00:00
xor-04.ll
xor-05.ll
xor-06.ll