[llvm] ba95539 - [SCEVExpander][PowerPC]clear scev rewriter before deleting instructions.
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 17:52:51 PDT 2020
Author: Chen Zheng
Date: 2020-08-03T20:36:08-04:00
New Revision: ba955397ac44e5df6135469d76c645fdcac256da
URL: https://github.com/llvm/llvm-project/commit/ba955397ac44e5df6135469d76c645fdcac256da
DIFF: https://github.com/llvm/llvm-project/commit/ba955397ac44e5df6135469d76c645fdcac256da.diff
LOG: [SCEVExpander][PowerPC]clear scev rewriter before deleting instructions.
Reviewed By: lebedev.ri
Differential Revision: https://reviews.llvm.org/D85130
Added:
Modified:
llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
index a7546d2be5d83..0068ad7174ee7 100644
--- a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
+++ b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
@@ -606,6 +606,10 @@ bool PPCLoopInstrFormPrep::rewriteLoadStores(Loop *L, Bucket &BucketChain,
NewBasePtr = NewPHI;
}
+ // Clear the rewriter cache, because values that are in the rewriter's cache
+ // can be deleted below, causing the AssertingVH in the cache to trigger.
+ SCEVE.clear();
+
if (Instruction *IDel = dyn_cast<Instruction>(BasePtr))
BBChanged.insert(IDel->getParent());
BasePtr->replaceAllUsesWith(NewBasePtr);
More information about the llvm-commits
mailing list