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

llvm-svn: 360640
This commit is contained in:
Sanjay Patel 2019-05-14 00:57:31 +00:00
parent 3a13d970aa
commit 99d6420a82
2 changed files with 3 additions and 3 deletions

View 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.

View 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();