[llvm] bfa200e - Remove an unused variable.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 15:20:16 PDT 2020


Author: Eric Christopher
Date: 2020-05-13T15:13:02-07:00
New Revision: bfa200ebcf3706fde0dde335a3c1fa3fe1b3ba3f

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

LOG: Remove an unused variable.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 4e10d6b79a1e..43b4393d2283 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5665,7 +5665,6 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
     // Inserting undef into undef is still undef.
     if (N1.isUndef() && N2.isUndef())
       return getUNDEF(VT);
-    SDValue Index = N3;
     assert(VT.isVector() && N1.getValueType().isVector() &&
            N2.getValueType().isVector() &&
            "Insert subvector VTs must be a vectors");
@@ -5673,10 +5672,10 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
            "Dest and insert subvector source types must match!");
     assert(N2.getSimpleValueType() <= N1.getSimpleValueType() &&
            "Insert subvector must be from smaller vector to larger vector!");
-    assert(isa<ConstantSDNode>(Index) &&
+    assert(isa<ConstantSDNode>(N3) &&
            "Insert subvector index must be constant");
     assert(N2.getValueType().getVectorNumElements() +
-                   cast<ConstantSDNode>(Index)->getZExtValue() <=
+                   cast<ConstantSDNode>(N3)->getZExtValue() <=
                VT.getVectorNumElements() &&
            "Insert subvector overflow!");
 


        


More information about the llvm-commits mailing list