File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,7 @@ bool CoalescerPair::setRegisters(const MachineInstr *MI) {
478
478
}
479
479
480
480
const MachineRegisterInfo &MRI = MI->getMF ()->getRegInfo ();
481
+ const TargetRegisterClass *SrcRC = MRI.getRegClass (Src);
481
482
482
483
if (Dst.isPhysical ()) {
483
484
// Eliminate DstSub on a physreg.
@@ -490,15 +491,14 @@ bool CoalescerPair::setRegisters(const MachineInstr *MI) {
490
491
491
492
// Eliminate SrcSub by picking a corresponding Dst superregister.
492
493
if (SrcSub) {
493
- Dst = TRI.getMatchingSuperReg (Dst, SrcSub, MRI. getRegClass (Src) );
494
+ Dst = TRI.getMatchingSuperReg (Dst, SrcSub, SrcRC );
494
495
if (!Dst)
495
496
return false ;
496
- } else if (!MRI. getRegClass (Src) ->contains (Dst)) {
497
+ } else if (!SrcRC ->contains (Dst)) {
497
498
return false ;
498
499
}
499
500
} else {
500
501
// Both registers are virtual.
501
- const TargetRegisterClass *SrcRC = MRI.getRegClass (Src);
502
502
const TargetRegisterClass *DstRC = MRI.getRegClass (Dst);
503
503
504
504
// Both registers have subreg indices.
You can’t perform that action at this time.
0 commit comments