[PATCH] D41380: [SCEV] Do not insert if it is already in cache
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 01:44:56 PST 2017
skatkov created this revision.
skatkov added reviewers: sanjoy, mkazantsev, craig.topper.
This is fix for the crash caused by ScalarEvolution::getTruncateExpr.
It expects that if it checked the condition that SCEV is not in UniqueSCEVs cache in
the beginning that it will not be there inside this method.
However during recursion and transformation/simplification for sub expression,
it is possible that these modifications will end up with the same SCEV as we started from.
So we must always check whether SCEV is in cache and do not insert item if it is already there.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4704 bytes
Desc: not available
More information about the llvm-commits