Fix SCEV forgetMemoizedResults should search and destroy backedge exprs.
Fixes PR15570: SEGV: SCEV back-edge info invalid after dead code removal. Indvars creates a SCEV expression for the loop's back edge taken count, then determines that the comparison is always true and removes it. When loop-unroll asks for the expression, it contains a NULL SCEVUnknkown (as a CallbackVH). forgetMemoizedResults should invalidate the loop back edges expression. llvm-svn: 177986
Showing
- llvm/include/llvm/Analysis/ScalarEvolution.h 4 additions, 0 deletionsllvm/include/llvm/Analysis/ScalarEvolution.h
- llvm/lib/Analysis/ScalarEvolution.cpp 30 additions, 0 deletionsllvm/lib/Analysis/ScalarEvolution.cpp
- llvm/test/Analysis/ScalarEvolution/scev-invalid.ll 34 additions, 0 deletionsllvm/test/Analysis/ScalarEvolution/scev-invalid.ll
Loading
Please register or sign in to comment