two register machineoperands are not identical unless their subregs match.

llvm-svn: 45455
This commit is contained in:
Chris Lattner 2007-12-30 20:55:08 +00:00
parent 81798417dc
commit 0dad74d252
1 changed files with 2 additions and 1 deletions

View File

@ -153,7 +153,8 @@ bool MachineOperand::isIdenticalTo(const MachineOperand &Other) const {
switch (getType()) {
default: assert(0 && "Unrecognized operand type");
case MachineOperand::MO_Register:
return getReg() == Other.getReg() && isDef() == Other.isDef();
return getReg() == Other.getReg() && isDef() == Other.isDef() &&
getSubReg() == Other.getSubReg();
case MachineOperand::MO_Immediate:
return getImm() == Other.getImm();
case MachineOperand::MO_MachineBasicBlock: