diff options
author | Florian Hahn <flo@fhahn.com> | 2022-10-18 17:38:14 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-10-18 17:38:14 +0100 |
commit | c65513444b04df35d9bab5a3c60e9cdafe959e9a (patch) | |
tree | a08403735e41539ae9280a0274c8b2bd3d21adcb /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | |
parent | c1864ab9534080ee77a016bca24dd9a318bc6d7e (diff) | |
download | llvm-c65513444b04df35d9bab5a3c60e9cdafe959e9a.zip llvm-c65513444b04df35d9bab5a3c60e9cdafe959e9a.tar.gz llvm-c65513444b04df35d9bab5a3c60e9cdafe959e9a.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp index 08c48b0..11efcae 100644 --- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp @@ -770,6 +770,7 @@ bool SimplifyIndvar::eliminateIdentitySCEV(Instruction *UseInst, LLVM_DEBUG(dbgs() << "INDVARS: Eliminated identity: " << *UseInst << '\n'); + SE->forgetValue(UseInst); UseInst->replaceAllUsesWith(IVOperand); ++NumElimIdentity; Changed = true; |