OSDN Git Service

[RegAllocFast] Don't insert kill flags of super-register for partial kill
authorQuentin Colombet <qcolombet@apple.com>
Fri, 7 Jul 2017 19:25:45 +0000 (19:25 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 7 Jul 2017 19:25:45 +0000 (19:25 +0000)
commit4e13bac06cfa8298baf441282a56e3c608535445
tree2558faaf5e8bf4cc274a8590ba85b00be1e4a115
parentb8caa0933a1e5ab2bd0668caf4b17d2c9a2aa72c
[RegAllocFast] Don't insert kill flags of super-register for partial kill

When reusing a register for a new definition, the fast register allocator
used to insert a kill flag at the previous last use of that register to
inform later passes that this register is free between the redef and the
last use. However, this may be wrong when subregisters are involved.
Indeed, a partially redef would have trigger a kill of the full super
register, potentially wrongly marking all the other subregisters as
free. Given we don't track which lanes are still live, we cannot set the
kill flag in such case.

Note: This bug has been latent for about 7 years (r104056).

llvmg.org/PR33677

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307428 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocFast.cpp
test/CodeGen/SystemZ/regalloc-fast-invalid-kill-flag.mir [new file with mode: 0644]