]> granicus.if.org Git - llvm/commitdiff
[SDAG] fix unused variable warning and unneeded indirection; NFC
authorSanjay Patel <spatel@rotateright.com>
Tue, 14 May 2019 00:57:31 +0000 (00:57 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 14 May 2019 00:57:31 +0000 (00:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360640 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp

index cb96e82baf90d75a9023a9ac74f2226ccdf48b30..8fe6f721584b97656ee084f3eae62dc646746b4e 100644 (file)
@@ -16173,7 +16173,7 @@ static SDValue scalarizeExtractedBinop(SDNode *ExtElt, SelectionDAG &DAG,
   SDValue Vec = ExtElt->getOperand(0);
   SDValue Index = ExtElt->getOperand(1);
   auto *IndexC = dyn_cast<ConstantSDNode>(Index);
-  if (!IndexC || !TLI.isBinOp(Vec->getOpcode()) || !Vec.hasOneUse())
+  if (!IndexC || !TLI.isBinOp(Vec.getOpcode()) || !Vec.hasOneUse())
     return SDValue();
 
   // Targets may want to avoid this to prevent an expensive register transfer.
index 3f3305f3ab9e70d75a21b4d1cc0782e93240f2b6..7cbb87bcdaec5df5e340851b7ebb16cbb808bdbb 100644 (file)
@@ -1747,9 +1747,9 @@ bool TargetLowering::SimplifyDemandedVectorElts(SDValue Op,
 static APInt getKnownUndefForVectorBinop(SDValue BO, SelectionDAG &DAG,
                                          const APInt &UndefOp0,
                                          const APInt &UndefOp1) {
-  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
   EVT VT = BO.getValueType();
-  assert(TLI.isBinOp(BO.getOpcode()) && VT.isVector() && "Vector binop only");
+  assert(DAG.getTargetLoweringInfo().isBinOp(BO.getOpcode()) && VT.isVector() &&
+         "Vector binop only");
 
   EVT EltVT = VT.getVectorElementType();
   unsigned NumElts = VT.getVectorNumElements();