From: Simon Pilgrim Date: Sun, 18 Sep 2022 13:35:04 +0000 (+0100) Subject: [DAG] MatchRotate - reuse existing LHSShiftArg/RHSShiftArg variables. NFC. X-Git-Tag: upstream/17.0.6~33245 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47cfe7102711cf3414eb32cf61d47a670ee28cb6;p=platform%2Fupstream%2Fllvm.git [DAG] MatchRotate - reuse existing LHSShiftArg/RHSShiftArg variables. NFC. --- diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 7a2e89e..daa1811 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -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)) {