[llvm] d4aeb50 - [RISCV] Simplify some code. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 14:54:43 PDT 2022


Author: Craig Topper
Date: 2022-03-21T14:50:56-07:00
New Revision: d4aeb5000ff49933be64a7c5423e8760b70d4cbd

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

LOG: [RISCV] Simplify some code. NFC

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 555d518b092f7..2ce540550680c 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -2340,8 +2340,7 @@ static SDValue lowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
 static SDValue splatPartsI64WithVL(const SDLoc &DL, MVT VT, SDValue Passthru,
                                    SDValue Lo, SDValue Hi, SDValue VL,
                                    SelectionDAG &DAG) {
-  bool HasPassthru = Passthru && !Passthru.isUndef();
-  if (!HasPassthru && !Passthru)
+  if (!Passthru)
     Passthru = DAG.getUNDEF(VT);
   if (isa<ConstantSDNode>(Lo) && isa<ConstantSDNode>(Hi)) {
     int32_t LoC = cast<ConstantSDNode>(Lo)->getSExtValue();


        


More information about the llvm-commits mailing list