Fix PR6283.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 13 Feb 2010 02:06:10 +0000 (02:06 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 13 Feb 2010 02:06:10 +0000 (02:06 +0000)
commitd135f14f614ff0272b4653877abe09a2914a0227
treef66367285040e50707fe44f64ab3294b93813360
parent9214b82c5446791b280821bbd892dca633130f80
Fix PR6283.

When coalescing with a physreg, remember to add imp-def and imp-kill when
dealing with sub-registers.

Also fix a related bug in VirtRegRewriter where substitutePhysReg may
reallocate the operand list on an instruction and invalidate the reg_iterator.
This can happen when a register is mentioned twice on the same instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96072 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/CodeGen/VirtRegRewriter.cpp
test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll [new file with mode: 0644]