diff options
author | Philip Reames <listmail@philipreames.com> | 2016-02-16 17:14:30 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2016-02-16 17:14:30 +0000 |
commit | 845435c86ac9fdc92093b7f1459589324b73d41f (patch) | |
tree | c220759577009da150c3a29af4584f9f778e5d59 /llvm/lib/Analysis/LazyValueInfo.cpp | |
parent | f8b8b7b5d0b43209595be13f3411fa20d365bf8d (diff) | |
download | bcm5719-llvm-845435c86ac9fdc92093b7f1459589324b73d41f.tar.gz bcm5719-llvm-845435c86ac9fdc92093b7f1459589324b73d41f.zip |
Revert 260705, it appears to be causing pr26628
The root issue appears to be a confusion around what makeNoWrapRegion actually does. It seems likely we need two versions of this function with slightly different semantics.
llvm-svn: 260981
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyValueInfo.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index d21b1bd8937..8f121110051 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -961,27 +961,6 @@ bool LazyValueInfoCache::solveBlockValueConstantRange(LVILatticeVal &BBLV, if (isa<BinaryOperator>(BBI)) { if (ConstantInt *RHS = dyn_cast<ConstantInt>(BBI->getOperand(1))) { RHSRange = ConstantRange(RHS->getValue()); - - // Try to use information about wrap flags to refine the range LHS can - // legally have. This is a slightly weird way to implement forward - // propagation over overflowing instructions, but it seems to be the only - // clean one we have. NOTE: Because we may have speculated the - // instruction, we can't constrain other uses of LHS even if they would - // seem to be equivelent control dependent with this op. - if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(BBI)) { - unsigned WrapKind = 0; - if (OBO->hasNoSignedWrap()) - WrapKind |= OverflowingBinaryOperator::NoSignedWrap; - if (OBO->hasNoUnsignedWrap()) - WrapKind |= OverflowingBinaryOperator::NoUnsignedWrap; - - if (WrapKind) { - auto OpCode = static_cast<Instruction::BinaryOps>(BBI->getOpcode()); - auto NoWrapCR = - ConstantRange::makeNoWrapRegion(OpCode, RHS->getValue(), WrapKind); - LHSRange = LHSRange.intersectWith(NoWrapCR); - } - } } else { BBLV.markOverdefined(); return true; |