diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2020-10-14 14:56:58 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-10-14 16:09:18 +0300 |
commit | 7ee6c402474a2f5fd21c403e7529f97f6362fdb3 (patch) | |
tree | c8796f00b6994aba87548b2670fb9b19adf223d7 /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | |
parent | 2c4226f8ac2c925d7e1d59d1de1660cd1dd63f31 (diff) | |
download | llvm-7ee6c402474a2f5fd21c403e7529f97f6362fdb3.zip llvm-7ee6c402474a2f5fd21c403e7529f97f6362fdb3.tar.gz llvm-7ee6c402474a2f5fd21c403e7529f97f6362fdb3.tar.bz2 |
Revert "Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown"" and it's follow-ups
While we haven't encountered an earth-shattering problem with this yet,
by now it is pretty evident that trying to model the ptr->int cast
implicitly leads to having to update every single place that assumed
no such cast could be needed. That is of course the wrong approach.
Let's back this out, and re-attempt with some another approach,
possibly one originally suggested by Eli Friedman in
https://bugs.llvm.org/show_bug.cgi?id=46786#c20
which should hopefully spare us this pain and more.
This reverts commits 1fb610429308a7c29c5065f5cc35dcc3fd69c8b1,
7324616660fc0995fa8c166e3c392361222d5dbc,
aaafe350bb65dfc24c2cdad4839059ac81899fbe,
e92a8e0c743f83552fac37ecf21e625ba3a4b11e.
I've kept&improved the tests though.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp index 3e280a6..2d71b0f 100644 --- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp @@ -427,7 +427,7 @@ static bool willNotOverflow(ScalarEvolution *SE, Instruction::BinaryOps BinOp, : &ScalarEvolution::getZeroExtendExpr; // Check ext(LHS op RHS) == ext(LHS) op ext(RHS) - auto *NarrowTy = cast<IntegerType>(SE->getEffectiveSCEVType(LHS->getType())); + auto *NarrowTy = cast<IntegerType>(LHS->getType()); auto *WideTy = IntegerType::get(NarrowTy->getContext(), NarrowTy->getBitWidth() * 2); |