BlockGenerators: Remove unnecessary const_cast

llvm-svn: 256227
This commit is contained in:
Tobias Grosser 2015-12-22 01:41:25 +00:00
parent ff1d084aa2
commit fcabb155c1
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ Value *BlockGenerator::trySynthesizeNewValue(ScopStmt &Stmt, Value *Old,
LoopToScevMapT &LTS,
Loop *L) const {
if (SE.isSCEVable(Old->getType()))
if (const SCEV *Scev = SE.getSCEVAtScope(const_cast<Value *>(Old), L)) {
if (const SCEV *Scev = SE.getSCEVAtScope(Old, L)) {
if (!isa<SCEVCouldNotCompute>(Scev)) {
const SCEV *NewScev = apply(Scev, LTS, SE);
ValueMapT VTV;