Re-enable elimination of unnecessary SUBREG_TO_REG instructions in
authorDan Gohman <gohman@apple.com>
Thu, 7 Aug 2008 02:54:50 +0000 (02:54 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 7 Aug 2008 02:54:50 +0000 (02:54 +0000)
commite3d920699c6df959f3e0844aeadd983b2955b23e
tree7578dc6bd96037d61f965d03bac25fbe96259ad7
parent865db4566e84b788e5738fec462804a779223b8b
Re-enable elimination of unnecessary SUBREG_TO_REG instructions in
LowerSubregs, and fix an x86-64 isel bug that this exposed.

SUBREG_TO_REG for x86-64 implicit zero extension is only safe for
isel to generate when the source is known to always have zeros in
the high 32 bits. The EXTRACT_SUBREG instruction does not clear
the high 32 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54444 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LowerSubregs.cpp
lib/Target/X86/X86Instr64bit.td
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/subreg-to-reg-0.ll [new file with mode: 0644]
test/CodeGen/X86/subreg-to-reg-1.ll [new file with mode: 0644]