diff options
author | Dan Gohman <gohman@apple.com> | 2012-07-09 23:51:20 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2012-07-09 23:51:20 +0000 |
commit | 3d1512384f9a86c50345d380a7a0a4324abc2979 (patch) | |
tree | fd4c0644439f81579a9ccfc48eab4042fee6e92f /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 5e781c6363c192d2a087f4bea681d42ce9400ad9 (diff) | |
download | bcm5719-llvm-3d1512384f9a86c50345d380a7a0a4324abc2979.tar.gz bcm5719-llvm-3d1512384f9a86c50345d380a7a0a4324abc2979.zip |
Delete code for folding undefs in ScalarEvolution. It's invalid in
obscure ways, and it isn't actually important in the real world.
llvm-svn: 159969
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index b8c92f83d9f..884ceec7a00 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -878,13 +878,6 @@ const SCEV *ScalarEvolution::getTruncateExpr(const SCEV *Op, return getAddRecExpr(Operands, AddRec->getLoop(), SCEV::FlagAnyWrap); } - // As a special case, fold trunc(undef) to undef. We don't want to - // know too much about SCEVUnknowns, but this special case is handy - // and harmless. - if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(Op)) - if (isa<UndefValue>(U->getValue())) - return getSCEV(UndefValue::get(Ty)); - // The cast wasn't folded; create an explicit cast node. We can reuse // the existing insert position since if we get here, we won't have // made any changes which would invalidate it. @@ -1344,13 +1337,6 @@ const SCEV *ScalarEvolution::getAnyExtendExpr(const SCEV *Op, return getAddRecExpr(Ops, AR->getLoop(), SCEV::FlagNW); } - // As a special case, fold anyext(undef) to undef. We don't want to - // know too much about SCEVUnknowns, but this special case is handy - // and harmless. - if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(Op)) - if (isa<UndefValue>(U->getValue())) - return getSCEV(UndefValue::get(Ty)); - // If the expression is obviously signed, use the sext cast value. if (isa<SCEVSMaxExpr>(Op)) return SExt; |