Coalescer should not delete extract_subreg, insert_subreg, and subreg_to_reg of
authorEvan Cheng <evan.cheng@apple.com>
Mon, 28 Sep 2009 05:28:43 +0000 (05:28 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 28 Sep 2009 05:28:43 +0000 (05:28 +0000)
commit0e6b590b91fcf6d49d2c25196f5053ce285e17f5
treeda1b9e6b4a8e12e2409e5bf29c19f5d62e836473
parent17167be9487025c90ed79ccc7d09f684be8a797a
Coalescer should not delete extract_subreg, insert_subreg, and subreg_to_reg of
physical registers. This is especially critical for the later two since they
start the live interval of a super-register. e.g.
%DO<def> = INSERT_SUBREG %D0<undef>, %S0<kill>, 1
If this instruction is eliminated, the register scavenger will not be happy as
D0 is not defined previously.
This fixes PR5055.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82968 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/ARM/2009-09-27-CoalescerBug.ll [new file with mode: 0644]
test/CodeGen/Blackfin/2009-08-15-LiveIn-SubReg.ll
test/CodeGen/X86/sink-hoist.ll