[DAG] MatchRotate - reuse existing LHSShiftArg/RHSShiftArg variables. NFC.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 18 Sep 2022 13:35:04 +0000 (14:35 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 18 Sep 2022 13:35:10 +0000 (14:35 +0100)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 7a2e89e..daa1811 100644 (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)) {