From: Simon Pilgrim Date: Thu, 27 Feb 2020 14:20:30 +0000 (+0000) Subject: Fix shadow variable warnings. NFC. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc7ac563ac3a76a5149257e5f95cf0474e7618cf;p=platform%2Fupstream%2Fllvm.git Fix shadow variable warnings. NFC. --- diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 7bde0ba..6e3473a 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -18986,15 +18986,15 @@ static SDValue lowerINT_TO_FP_vXi64(SDValue Op, SelectionDAG &DAG, SmallVector SignCvts(4); SmallVector Chains(4); for (int i = 0; i != 4; ++i) { - SDValue Src = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, MVT::i64, SignSrc, + SDValue Elt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, MVT::i64, SignSrc, DAG.getIntPtrConstant(i, DL)); if (IsStrict) { SignCvts[i] = DAG.getNode(ISD::STRICT_SINT_TO_FP, DL, {MVT::f32, MVT::Other}, - {Op.getOperand(0), Src}); + {Op.getOperand(0), Elt}); Chains[i] = SignCvts[i].getValue(1); } else { - SignCvts[i] = DAG.getNode(ISD::SINT_TO_FP, DL, MVT::f32, Src); + SignCvts[i] = DAG.getNode(ISD::SINT_TO_FP, DL, MVT::f32, Elt); } } SDValue SignCvt = DAG.getBuildVector(VT, DL, SignCvts); @@ -27357,10 +27357,10 @@ static SDValue LowerRotate(SDValue Op, const X86Subtarget &Subtarget, if (Subtarget.hasAVX512() && 32 <= EltSizeInBits) { // Attempt to rotate by immediate. if (0 <= CstSplatIndex) { - unsigned Op = (Opcode == ISD::ROTL ? X86ISD::VROTLI : X86ISD::VROTRI); - uint64_t RotateAmt = EltBits[CstSplatIndex].urem(EltSizeInBits); - return DAG.getNode(Op, DL, VT, R, - DAG.getTargetConstant(RotateAmt, DL, MVT::i8)); + unsigned RotOpc = (Opcode == ISD::ROTL ? X86ISD::VROTLI : X86ISD::VROTRI); + uint64_t RotAmt = EltBits[CstSplatIndex].urem(EltSizeInBits); + return DAG.getNode(RotOpc, DL, VT, R, + DAG.getTargetConstant(RotAmt, DL, MVT::i8)); } // Else, fall-back on VPROLV/VPRORV. @@ -29467,14 +29467,14 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N, SDValue SignSrc = DAG.getSelect(dl, SrcVT, IsNeg, Sign, Src); SmallVector SignCvts(4, DAG.getConstantFP(0.0, dl, MVT::f32)); for (int i = 0; i != 2; ++i) { - SDValue Src = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, MVT::i64, + SDValue Elt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, MVT::i64, SignSrc, DAG.getIntPtrConstant(i, dl)); if (IsStrict) SignCvts[i] = DAG.getNode(ISD::STRICT_SINT_TO_FP, dl, {MVT::f32, MVT::Other}, - {N->getOperand(0), Src}); + {N->getOperand(0), Elt}); else - SignCvts[i] = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::f32, Src); + SignCvts[i] = DAG.getNode(ISD::SINT_TO_FP, dl, MVT::f32, Elt); }; SDValue SignCvt = DAG.getBuildVector(MVT::v4f32, dl, SignCvts); SDValue Slow, Chain; @@ -36715,13 +36715,13 @@ SDValue X86TargetLowering::SimplifyMultipleUseDemandedBitsForTargetNode( int M = ShuffleMask[i]; if (!DemandedElts[i] || ShuffleUndef[i]) continue; - int Op = M / NumElts; - int Index = M % NumElts; - if (M < 0 || Index != i) { + int OpIdx = M / NumElts; + int EltIdx = M % NumElts; + if (M < 0 || EltIdx != i) { IdentityOp.clearAllBits(); break; } - IdentityOp &= APInt::getOneBitSet(NumOps, Op); + IdentityOp &= APInt::getOneBitSet(NumOps, OpIdx); if (IdentityOp == 0) break; }