Skip to content

Commit

Permalink
[SCEV] Skip instrs with non-scevable types in visitAndClearUsers.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fhahn committed Apr 28, 2023
1 parent 02c5eb5 commit 4c2d29f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Analysis/ScalarEvolution.cpp
Expand Up @@ -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));
Expand Down

0 comments on commit 4c2d29f

Please sign in to comment.