diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index b2862275298..9866f412340 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -956,16 +956,16 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) { // deterministic and predictable because we're naming newly created // instructions. for (auto Pair : states) { - Instruction *v = cast(Pair.first); + Instruction *BDV = cast(Pair.first); BDVState state = Pair.second; - assert(!isKnownBaseResult(v) && "why did it get added?"); + assert(!isKnownBaseResult(BDV) && "why did it get added?"); assert(!state.isUnknown() && "Optimistic algorithm didn't complete!"); if (!state.isConflict()) continue; if (PHINode *basephi = dyn_cast(state.getBase())) { - PHINode *phi = cast(v); + PHINode *phi = cast(BDV); unsigned NumPHIValues = phi->getNumIncomingValues(); for (unsigned i = 0; i < NumPHIValues; i++) { Value *InVal = phi->getIncomingValue(i); @@ -1008,7 +1008,7 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) { } assert(basephi->getNumIncomingValues() == NumPHIValues); } else if (SelectInst *BaseSel = dyn_cast(state.getBase())) { - SelectInst *Sel = cast(v); + SelectInst *Sel = cast(BDV); // Operand 1 & 2 are true, false path respectively. TODO: refactor to // something more safe and less hacky. for (int i = 1; i <= 2; i++) { @@ -1019,14 +1019,14 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) { BaseSel->setOperand(i, Base); } } else if (auto *BaseEE = dyn_cast(state.getBase())) { - Value *InVal = cast(v)->getVectorOperand(); + Value *InVal = cast(BDV)->getVectorOperand(); // Find the instruction which produces the base for each input. We may // need to insert a bitcast. Value *Base = getBaseForInput(InVal, BaseEE); BaseEE->setOperand(0, Base); } else { auto *BaseIE = cast(state.getBase()); - auto *BdvIE = cast(v); + auto *BdvIE = cast(BDV); auto UpdateOperand = [&](int OperandIdx) { Value *InVal = BdvIE->getOperand(OperandIdx); Value *Base = findBaseOrBDV(InVal, cache);