[RISCV] Simplify some code. NFC
authorCraig Topper <craig.topper@sifive.com>
Mon, 21 Mar 2022 21:50:05 +0000 (14:50 -0700)
committerCraig Topper <craig.topper@sifive.com>
Mon, 21 Mar 2022 21:50:56 +0000 (14:50 -0700)
llvm/lib/Target/RISCV/RISCVISelLowering.cpp

index 555d518..2ce5405 100644 (file)
@@ -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();