X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FAnalysis%2FScalarEvolution.cpp;h=177bd23030a7bec57f22db21cafa2d7e5c8462e2;hp=792542eab2553f005ecea9a04a4b2406737d3b20;hb=dad20b2ae2544708d6a33abdb9bddd0a329f50e0;hpb=db7b69e3a634c5fdff0eceeee2a41ee49c3270a2 diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 792542eab25..177bd23030a 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -3750,8 +3750,10 @@ static Optional GetRangeFromMetadata(Value *V) { assert(NumRanges >= 1); for (unsigned i = 0; i < NumRanges; ++i) { - ConstantInt *Lower = cast(MD->getOperand(2*i + 0)); - ConstantInt *Upper = cast(MD->getOperand(2*i + 1)); + ConstantInt *Lower = + mdconst::extract(MD->getOperand(2 * i + 0)); + ConstantInt *Upper = + mdconst::extract(MD->getOperand(2 * i + 1)); ConstantRange Range(Lower->getValue(), Upper->getValue()); TotalRange = TotalRange.unionWith(Range); }