File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -350,8 +350,8 @@ bool MachineOperand::isIdenticalTo(const MachineOperand &Other) const {
350350 case MachineOperand::MO_RegisterMask:
351351 case MachineOperand::MO_RegisterLiveOut: {
352352 // Shallow compare of the two RegMasks
353- const uint32_t *RegMask = getRegMask ();
354- const uint32_t *OtherRegMask = Other.getRegMask ();
353+ const uint32_t *RegMask = isRegMask () ? getRegMask () : getRegLiveOut ();
354+ const uint32_t *OtherRegMask = isRegMask () ? Other.getRegMask () : Other. getRegLiveOut ();
355355 if (RegMask == OtherRegMask)
356356 return true ;
357357
@@ -421,7 +421,7 @@ hash_code llvm::hash_value(const MachineOperand &MO) {
421421 if (const MachineFunction *MF = getMFIfAvailable (MO)) {
422422 const TargetRegisterInfo *TRI = MF->getSubtarget ().getRegisterInfo ();
423423 unsigned RegMaskSize = MachineOperand::getRegMaskSize (TRI->getNumRegs ());
424- const uint32_t *RegMask = MO.getRegMask ();
424+ const uint32_t *RegMask = MO.isRegMask () ? MO. getRegMask () : MO. getRegLiveOut ();
425425 std::vector<stable_hash> RegMaskHashes (RegMask, RegMask + RegMaskSize);
426426 return hash_combine (MO.getType (), MO.getTargetFlags (),
427427 stable_hash_combine (RegMaskHashes));
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ stable_hash llvm::stableHashValue(const MachineOperand &MO) {
136136 const TargetRegisterInfo *TRI = MF->getSubtarget ().getRegisterInfo ();
137137 unsigned RegMaskSize =
138138 MachineOperand::getRegMaskSize (TRI->getNumRegs ());
139- const uint32_t *RegMask = MO.getRegMask ();
139+ const uint32_t *RegMask = MO.isRegMask () ? MO. getRegMask () : MO. getRegLiveOut ();
140140 std::vector<llvm::stable_hash> RegMaskHashes (RegMask,
141141 RegMask + RegMaskSize);
142142 return stable_hash_combine (MO.getType (), MO.getTargetFlags (),
You can’t perform that action at this time.
0 commit comments