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 @@ -826,8 +826,7 @@ bool SIFoldOperandsImpl::tryToFoldACImm(
826
826
return false ;
827
827
828
828
uint8_t OpTy = Desc.operands ()[UseOpIdx].OperandType ;
829
- if (OpToFold.isImm () && TII->isInlineConstant (OpToFold, OpTy) &&
830
- TII->isOperandLegal (*UseMI, UseOpIdx, &OpToFold)) {
829
+ if (OpToFold.isImm () && TII->isOperandLegal (*UseMI, UseOpIdx, &OpToFold)) {
831
830
UseMI->getOperand (UseOpIdx).ChangeToImmediate (OpToFold.getImm ());
832
831
return true ;
833
832
}
@@ -847,8 +846,7 @@ bool SIFoldOperandsImpl::tryToFoldACImm(
847
846
MachineOperand &UseOp = UseMI->getOperand (UseOpIdx);
848
847
if (!UseOp.getSubReg () && Def && TII->isFoldableCopy (*Def)) {
849
848
MachineOperand &DefOp = Def->getOperand (1 );
850
- if (DefOp.isImm () && TII->isInlineConstant (DefOp, OpTy) &&
851
- TII->isOperandLegal (*UseMI, UseOpIdx, &DefOp)) {
849
+ if (DefOp.isImm () && TII->isOperandLegal (*UseMI, UseOpIdx, &DefOp)) {
852
850
UseMI->getOperand (UseOpIdx).ChangeToImmediate (DefOp.getImm ());
853
851
return true ;
854
852
}
You can’t perform that action at this time.
0 commit comments