Unverified Commit 4c2d29f2 authored by Florian Hahn's avatar Florian Hahn
Browse files

[SCEV] Skip instrs with non-scevable types in visitAndClearUsers.

No SCEVs are formed for instructions with non-scevable types, so no
other SCEV expressions can depend on them. Skip those instructions and
their users when invalidating SCEV expressions.

Depends on D144847.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D144848
parent 02c5eb56
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8385,6 +8385,8 @@ void ScalarEvolution::visitAndClearUsers(
    SmallVectorImpl<const SCEV *> &ToForget) {
  while (!Worklist.empty()) {
    Instruction *I = Worklist.pop_back_val();
    if (!isSCEVable(I->getType()))
      continue;
    ValueExprMapType::iterator It =
        ValueExprMap.find_as(static_cast<Value *>(I));