forked from OSchip/llvm-project
parent
9abf2424cb
commit
610ad9b53f
|
@ -906,7 +906,7 @@ class WidenIV {
|
||||||
SmallVector<NarrowIVDefUse, 8> NarrowIVUsers;
|
SmallVector<NarrowIVDefUse, 8> NarrowIVUsers;
|
||||||
|
|
||||||
enum ExtendKind { ZeroExtended, SignExtended, Unknown };
|
enum ExtendKind { ZeroExtended, SignExtended, Unknown };
|
||||||
// A map tracking the kind of extension used to widen each narrow IV
|
// A map tracking the kind of extension used to widen each narrow IV
|
||||||
// and narrow IV user.
|
// and narrow IV user.
|
||||||
// Key: pointer to a narrow IV or IV user.
|
// Key: pointer to a narrow IV or IV user.
|
||||||
// Value: the kind of extension used to widen this Instruction.
|
// Value: the kind of extension used to widen this Instruction.
|
||||||
|
@ -1608,7 +1608,7 @@ void WidenIV::calculatePostIncRange(Instruction *NarrowDef,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CmpInst::Predicate P =
|
CmpInst::Predicate P =
|
||||||
TrueDest ? Pred : CmpInst::getInversePredicate(Pred);
|
TrueDest ? Pred : CmpInst::getInversePredicate(Pred);
|
||||||
|
|
||||||
auto CmpRHSRange = SE->getSignedRange(SE->getSCEV(CmpRHS));
|
auto CmpRHSRange = SE->getSignedRange(SE->getSCEV(CmpRHS));
|
||||||
auto CmpConstrainedLHSRange =
|
auto CmpConstrainedLHSRange =
|
||||||
|
@ -1634,7 +1634,7 @@ void WidenIV::calculatePostIncRange(Instruction *NarrowDef,
|
||||||
UpdateRangeFromGuards(NarrowUser);
|
UpdateRangeFromGuards(NarrowUser);
|
||||||
|
|
||||||
BasicBlock *NarrowUserBB = NarrowUser->getParent();
|
BasicBlock *NarrowUserBB = NarrowUser->getParent();
|
||||||
// If NarrowUserBB is statically unreachable asking dominator queries may
|
// If NarrowUserBB is statically unreachable asking dominator queries may
|
||||||
// yield surprising results. (e.g. the block may not have a dom tree node)
|
// yield surprising results. (e.g. the block may not have a dom tree node)
|
||||||
if (!DT->isReachableFromEntry(NarrowUserBB))
|
if (!DT->isReachableFromEntry(NarrowUserBB))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue