[llvm] 4021215 - [RISCV] Rename hasNonZeroAVL->isNonZeroAVL. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 10:50:23 PDT 2023


Author: Craig Topper
Date: 2023-04-25T10:49:57-07:00
New Revision: 4021215fdf999f8fca294f04b4ac92e239be4304

URL: https://github.com/llvm/llvm-project/commit/4021215fdf999f8fca294f04b4ac92e239be4304
DIFF: https://github.com/llvm/llvm-project/commit/4021215fdf999f8fca294f04b4ac92e239be4304.diff

LOG: [RISCV] Rename hasNonZeroAVL->isNonZeroAVL. NFC

The argument is the AVL itself, not some operation that has an AVL.
Thus "is" instead of "has" is a better name.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 0bf4fe996bbf..6d2b442b0c2a 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -6612,7 +6612,7 @@ SDValue RISCVTargetLowering::lowerVectorMaskVecReduction(SDValue Op,
   return DAG.getNode(BaseOpc, DL, XLenVT, SetCC, Op.getOperand(0));
 }
 
-static bool hasNonZeroAVL(SDValue AVL) {
+static bool isNonZeroAVL(SDValue AVL) {
   auto *RegisterAVL = dyn_cast<RegisterSDNode>(AVL);
   auto *ImmAVL = dyn_cast<ConstantSDNode>(AVL);
   return (RegisterAVL && RegisterAVL->getReg() == RISCV::X0) ||
@@ -6628,7 +6628,7 @@ static SDValue lowerReductionSeq(unsigned RVVOpcode, MVT ResVT,
   const MVT VecVT = Vec.getSimpleValueType();
   const MVT M1VT = getLMUL1VT(VecVT);
   const MVT XLenVT = Subtarget.getXLenVT();
-  const bool NonZeroAVL = hasNonZeroAVL(VL);
+  const bool NonZeroAVL = isNonZeroAVL(VL);
 
   // The reduction needs an LMUL1 input; do the splat at either LMUL1
   // or the original VT if fractional.
@@ -9158,7 +9158,7 @@ static SDValue combineBinOpToReduce(SDNode *N, SelectionDAG &DAG,
       ScalarV.getOpcode() != RISCVISD::VMV_V_X_VL)
     return SDValue();
 
-  if (!hasNonZeroAVL(ScalarV.getOperand(2)))
+  if (!isNonZeroAVL(ScalarV.getOperand(2)))
     return SDValue();
 
   // Check the scalar of ScalarV is neutral element


        


More information about the llvm-commits mailing list