[IndVars] Forget SCEV for replaced PHI.
authorFlorian Hahn <flo@fhahn.com>
Fri, 4 Nov 2022 18:42:06 +0000 (18:42 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 4 Nov 2022 18:42:07 +0000 (18:42 +0000)
commit9a456b7ad3125834377b8aab1598785e8559c224
tree6accc3a19c60f7089a5d775fde367d81353419b9
parent1186e9d59fea662292cdf62fdd1544b5b27d7d37
[IndVars] Forget SCEV for replaced PHI.

Additional SCEV verification highlighted a case where the cached loop
dispositions where incorrect after simplifying a phi node in IndVars.
Fix it by invalidating the phi before replacing it.

Fixes #58750
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/test/Transforms/IndVarSimplify/invalidate-modified-lcssa-phi.ll