[DAG] MatchRotate - reuse existing LHSShiftArg/RHSShiftArg variables. NFC.

This commit is contained in:
Simon Pilgrim 2022-09-18 14:35:04 +01:00
parent 303526ef3a
commit 47cfe71027
1 changed files with 1 additions and 1 deletions

View File

@ -7687,7 +7687,7 @@ SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
};
// TODO: Support pre-legalization funnel-shift by constant.
bool IsRotate = LHSShift.getOperand(0) == RHSShift.getOperand(0);
bool IsRotate = LHSShiftArg == RHSShiftArg;
if (!IsRotate && !(HasFSHL || HasFSHR)) {
if (TLI.isTypeLegal(VT) && LHS.hasOneUse() && RHS.hasOneUse() &&
ISD::matchBinaryPredicate(LHSShiftAmt, RHSShiftAmt, MatchRotateSum)) {