File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1068,18 +1068,14 @@ void SIFoldOperandsImpl::foldOperand(
10681068 if (MovOp == AMDGPU::COPY)
10691069 return ;
10701070
1071- // Check for common register subclass between destination (DestRC) and MOV
1072- // result (ResRC). If exists, verify this common subclass is a superclass of
1073- // (or equal to) the destination register class, otherwise folding is
1074- // illegal.
1075-
1071+ // Fold if the destination register class of the MOV instruction (ResRC)
1072+ // is a superclass of (or equal to) the destination register class of the COPY (DestRC).
1073+ // If this condition fails, folding would be illegal.
10761074 const MCInstrDesc &MovDesc = TII->get (MovOp);
10771075 assert (MovDesc.getNumDefs () > 0 && MovDesc.operands ()[0 ].RegClass != -1 );
10781076 const TargetRegisterClass *ResRC =
10791077 TRI->getRegClass (MovDesc.operands ()[0 ].RegClass );
1080- const TargetRegisterClass *CommonRC = TRI->getCommonSubClass (DestRC, ResRC);
1081-
1082- if (!CommonRC || !DestRC->hasSuperClassEq (CommonRC))
1078+ if (!DestRC->hasSuperClassEq (ResRC))
10831079 return ;
10841080
10851081 MachineInstr::mop_iterator ImpOpI = UseMI->implicit_operands ().begin ();
You can’t perform that action at this time.
0 commit comments