No test case for this. I ran into it while working on some improvements
to SIShrinkInstructions.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241816
91177308-0d34-0410-b5e6-
96231b3b80d8
if (MO->isReg()) {
assert(DefinedRC);
- const TargetRegisterClass *RC = MRI.getRegClass(MO->getReg());
+ const TargetRegisterClass *RC =
+ TargetRegisterInfo::isVirtualRegister(MO->getReg()) ?
+ MRI.getRegClass(MO->getReg()) :
+ RI.getPhysRegClass(MO->getReg());
// In order to be legal, the common sub-class must be equal to the
// class of the current operand. For example: