[llvm] r360640 - [SDAG] fix unused variable warning and unneeded indirection; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 17:57:31 PDT 2019


Author: spatel
Date: Mon May 13 17:57:31 2019
New Revision: 360640

URL: http://llvm.org/viewvc/llvm-project?rev=360640&view=rev
Log:
[SDAG] fix unused variable warning and unneeded indirection; NFC

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=360640&r1=360639&r2=360640&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon May 13 17:57:31 2019
@@ -16173,7 +16173,7 @@ static SDValue scalarizeExtractedBinop(S
   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.

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=360640&r1=360639&r2=360640&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon May 13 17:57:31 2019
@@ -1747,9 +1747,9 @@ bool TargetLowering::SimplifyDemandedVec
 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();




More information about the llvm-commits mailing list