[llvm-commits] [llvm] r97861 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp
Evan Cheng
evan.cheng at apple.com
Fri Mar 5 17:14:19 PST 2010
Author: evancheng
Date: Fri Mar 5 19:14:19 2010
New Revision: 97861
URL: http://llvm.org/viewvc/llvm-project?rev=97861&view=rev
Log:
Don't update physical register def.
Modified:
llvm/trunk/lib/CodeGen/MachineCSE.cpp
Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=97861&r1=97860&r2=97861&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Fri Mar 5 19:14:19 2010
@@ -238,8 +238,9 @@
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);
More information about the llvm-commits
mailing list