File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -824,8 +824,7 @@ bool SIFoldOperandsImpl::tryToFoldACImm(
824824 return false ;
825825
826826 uint8_t OpTy = Desc.operands ()[UseOpIdx].OperandType ;
827- if (OpToFold.isImm () && TII->isInlineConstant (OpToFold, OpTy) &&
828- TII->isOperandLegal (*UseMI, UseOpIdx, &OpToFold)) {
827+ if (OpToFold.isImm () && TII->isOperandLegal (*UseMI, UseOpIdx, &OpToFold)) {
829828 UseMI->getOperand (UseOpIdx).ChangeToImmediate (OpToFold.getImm ());
830829 return true ;
831830 }
@@ -845,8 +844,7 @@ bool SIFoldOperandsImpl::tryToFoldACImm(
845844 MachineOperand &UseOp = UseMI->getOperand (UseOpIdx);
846845 if (!UseOp.getSubReg () && Def && TII->isFoldableCopy (*Def)) {
847846 MachineOperand &DefOp = Def->getOperand (1 );
848- if (DefOp.isImm () && TII->isInlineConstant (DefOp, OpTy) &&
849- TII->isOperandLegal (*UseMI, UseOpIdx, &DefOp)) {
847+ if (DefOp.isImm () && TII->isOperandLegal (*UseMI, UseOpIdx, &DefOp)) {
850848 UseMI->getOperand (UseOpIdx).ChangeToImmediate (DefOp.getImm ());
851849 return true ;
852850 }
You can’t perform that action at this time.
0 commit comments