[IndVars] Forget SCEV for value after simplifying condition.
authorFlorian Hahn <flo@fhahn.com>
Fri, 21 Oct 2022 10:18:01 +0000 (11:18 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 21 Oct 2022 10:18:01 +0000 (11:18 +0100)
commitfd236772f5665ce9e55f85ac992be6c22a918d3e
tree1405686cfd7ee198ba471b34335595ebf9381cc3
parente9754f0211076bab34e5a070cb8eb392a21c0540
[IndVars] Forget SCEV for value after simplifying condition.

Additional SCEV verification highlighted a case where the cached loop
dispositions where incorrect after simplifying a condition in IndVars
and moving the user in LoopDeletion. Fix it by invalidating ICmp and all
its users.

Fixes #58515.
llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
llvm/test/Transforms/IndVarSimplify/invalidate-modified-lcssa-phi.ll