[RISCV] Minor style cleanups in post ISEL combines
authorPhilip Reames <preames@rivosinc.com>
Tue, 18 Jul 2023 19:22:08 +0000 (12:22 -0700)
committerPhilip Reames <listmail@philipreames.com>
Tue, 18 Jul 2023 19:26:36 +0000 (12:26 -0700)
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

index 4ee2aec..f7b37ed 100644 (file)
@@ -301,15 +301,11 @@ void RISCVDAGToDAGISel::addVectorLoadStoreOperands(
   // none of the others do.  All have passthru operands.  For our pseudos,
   // all loads have policy operands.
   if (IsLoad) {
-    if (IsMasked) {
-      uint64_t Policy = Node->getConstantOperandVal(CurOp++);
-      SDValue PolicyOp = CurDAG->getTargetConstant(Policy, DL, XLenVT);
-      Operands.push_back(PolicyOp);
-    } else {
-      uint64_t Policy = RISCVII::MASK_AGNOSTIC;
-      SDValue PolicyOp = CurDAG->getTargetConstant(Policy, DL, XLenVT);
-      Operands.push_back(PolicyOp);
-    }
+    uint64_t Policy = RISCVII::MASK_AGNOSTIC;
+    if (IsMasked)
+      Policy = Node->getConstantOperandVal(CurOp++);
+    SDValue PolicyOp = CurDAG->getTargetConstant(Policy, DL, XLenVT);
+    Operands.push_back(PolicyOp);
   }
 
   Operands.push_back(Chain); // Chain.
@@ -3178,11 +3174,9 @@ bool RISCVDAGToDAGISel::doPeepholeMaskedRVV(SDNode *N) {
     return false;
 
   unsigned MaskOpIdx = I->MaskOpIdx;
-
   if (!usesAllOnesMask(N, MaskOpIdx))
     return false;
 
-
   // There are two classes of pseudos in the table - compares and
   // everything else.  See the comment on RISCVMaskedPseudo for details.
   const unsigned Opc = I->UnmaskedPseudo;