[IndVars] Forget SCEV for instruction and users before replacing it.
authorFlorian Hahn <flo@fhahn.com>
Tue, 18 Oct 2022 16:38:14 +0000 (17:38 +0100)
committerFlorian Hahn <flo@fhahn.com>
Tue, 18 Oct 2022 16:38:14 +0000 (17:38 +0100)
commitc65513444b04df35d9bab5a3c60e9cdafe959e9a
treea08403735e41539ae9280a0274c8b2bd3d21adcb
parentc1864ab9534080ee77a016bca24dd9a318bc6d7e
[IndVars] Forget SCEV for instruction and users before replacing it.

Extra invalidation is needed here to clear stale values to fix a
verification failure.

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