[RISCV] Use isShiftedInt to improve readability. NFC
This commit is contained in:
parent
a43c55dcd7
commit
052536b923
|
@ -211,7 +211,7 @@ def CSImm12MulBy4 : PatLeaf<(imm), [{
|
|||
return false;
|
||||
int64_t C = N->getSExtValue();
|
||||
// Skip if C is simm12 or can be optimized by the PatLeaf AddiPair.
|
||||
return !isInt<13>(C) && isInt<14>(C) && (C & 3) == 0;
|
||||
return !isInt<13>(C) && isShiftedInt<12, 2>(C);
|
||||
}]>;
|
||||
|
||||
def CSImm12MulBy8 : PatLeaf<(imm), [{
|
||||
|
@ -220,7 +220,7 @@ def CSImm12MulBy8 : PatLeaf<(imm), [{
|
|||
int64_t C = N->getSExtValue();
|
||||
// Skip if C is simm12 or can be optimized by the PatLeaf AddiPair or
|
||||
// CSImm12MulBy4.
|
||||
return !isInt<14>(C) && isInt<15>(C) && (C & 7) == 0;
|
||||
return !isInt<14>(C) && isShiftedInt<12, 3>(C);
|
||||
}]>;
|
||||
|
||||
def SimmShiftRightBy2XForm : SDNodeXForm<imm, [{
|
||||
|
|
Loading…
Reference in New Issue