Skip to content

Commit 92a0a65

Browse files
committed
Early exit if getLargestLegalSuperClass can't change the class
1 parent 05eb7bb commit 92a0a65

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ bool AMDGPURewriteAGPRCopyMFMAImpl::recomputeRegClassExceptRewritable(
8989

9090
// Inflate to the equivalent AV_* class.
9191
const TargetRegisterClass *NewRC = TRI.getLargestLegalSuperClass(OldRC, MF);
92+
if (OldRC == NewRC)
93+
return false;
9294

9395
// Accumulate constraints from all uses.
9496
for (MachineOperand &MO : MRI.reg_nodbg_operands(Reg)) {

0 commit comments

Comments
 (0)