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(
824
824
return false ;
825
825
826
826
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)) {
829
828
UseMI->getOperand (UseOpIdx).ChangeToImmediate (OpToFold.getImm ());
830
829
return true ;
831
830
}
@@ -845,8 +844,7 @@ bool SIFoldOperandsImpl::tryToFoldACImm(
845
844
MachineOperand &UseOp = UseMI->getOperand (UseOpIdx);
846
845
if (!UseOp.getSubReg () && Def && TII->isFoldableCopy (*Def)) {
847
846
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)) {
850
848
UseMI->getOperand (UseOpIdx).ChangeToImmediate (DefOp.getImm ());
851
849
return true ;
852
850
}
You can’t perform that action at this time.
0 commit comments