Don't update physical register def.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97861 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2010-03-06 01:14:19 +00:00
parent fc8ccfedbb
commit 6cc1aeaad2

View File

@ -238,8 +238,9 @@ bool MachineCSE::ProcessBlock(MachineDomTreeNode *Node) {
continue;
unsigned OldReg = MO.getReg();
unsigned NewReg = CSMI->getOperand(i).getReg();
assert(OldReg != NewReg &&
TargetRegisterInfo::isVirtualRegister(OldReg) &&
if (OldReg == NewReg)
continue;
assert(TargetRegisterInfo::isVirtualRegister(OldReg) &&
TargetRegisterInfo::isVirtualRegister(NewReg) &&
"Do not CSE physical register defs!");
MRI->replaceRegWith(OldReg, NewReg);