- Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests and
authorEvan Cheng <evan.cheng@apple.com>
Mon, 26 Oct 2009 04:56:07 +0000 (04:56 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 26 Oct 2009 04:56:07 +0000 (04:56 +0000)
commita5dc45e3c8fa26e62b187284a240adf3879b56e2
tree28c8aa7256bf5b84207c2f1674c338e15f62dee0
parent85def1607922c25300f899679fc983d9881db8af
- Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests and
  bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg
  around.
- Relax register scavenging to allow use of partially "not-live" registers. It's
  common for targets to operate on registers where the top bits are undef. e.g.
  s0 =
  d0 = insert_subreg d0<undef>, s0, 1
  ...
     = d0
  When the insert_subreg is eliminated by the coalescer, the scavenger used to
  complain. The previous fix was to keep to insert_subreg around. But that's
  brittle and it's overly conservative when we want to use the scavenger to
  allocate registers. It's actually legal and desirable for other instructions
  to use the "undef" part of d0. e.g.
  s0 =
  d0 = insert_subreg d0<undef>, s0, 1
  ...
  s1 =
     = s1
     = d0
  We probably need add a "partial-undef" marker on machine operand so the
  machine verifier would not complain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85091 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/RegisterScavenging.cpp
lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/CodeGen/VirtRegRewriter.cpp
test/CodeGen/X86/2009-10-25-RewriterBug.ll [new file with mode: 0644]