Fix machine-cp by having it to check sub-register indicies. e.g.
authorEvan Cheng <evan.cheng@apple.com>
Mon, 20 Feb 2012 23:28:17 +0000 (23:28 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 20 Feb 2012 23:28:17 +0000 (23:28 +0000)
commit01b623c8c2d1bd015a8bb20eafee3322575eff8f
treec0c84728e3eea442bee36fcf519a5ba9a570e958
parentacb6f5096f566cb9ed41226c8dd95368209cc892
Fix machine-cp by having it to check sub-register indicies. e.g.
ecx = mov eax
al  = mov ch
The second copy is not a nop because the sub-indices of ecx,ch is not the
same of that of eax/al.

Re-enabled machine-cp.
PR11940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151002 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineCopyPropagation.cpp
lib/CodeGen/Passes.cpp
test/CodeGen/X86/2012-02-20-MachineCPBug.ll [new file with mode: 0644]
test/CodeGen/X86/machine-cp.ll