llvm-project/llvm
Serguei Katkov edf3c8292b [SCEV] Do not insert if it is already in cache
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.

Reviewers: sanjoy, mkazantsev, craig.topper	
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41380

llvm-svn: 321472
2017-12-27 07:15:23 +00:00
..
bindings
cmake [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones. 2017-12-25 01:23:09 +00:00
docs [docs] Use dbgs() instead of errs() for DEBUG() 2017-12-25 14:16:07 +00:00
examples PR35705: Fix Chapter 9 example code for API changes to DIBuilder 2017-12-20 19:36:54 +00:00
include [NFC] Extract out a helper function for SimplifyCall(CS, Q) 2017-12-27 00:16:12 +00:00
lib [SCEV] Do not insert if it is already in cache 2017-12-27 07:15:23 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes [runtimes] Add install-*-stripped targets 2017-12-08 19:42:46 +00:00
test [SCEV] Do not insert if it is already in cache 2017-12-27 07:15:23 +00:00
tools [llvm-readobj] Fix ambiguous call to the `printNumber` 2017-12-21 10:46:20 +00:00
unittests Unbreak the build. Combining chrono with Optional is annoying. 2017-12-22 21:18:50 +00:00
utils [git-llvm] Handle files ignored by svn correctly 2017-12-22 21:19:13 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true. 2017-11-17 21:59:43 +00:00
.gitignore
CMakeLists.txt [cmake] Update experimental target error message 2017-12-18 19:15:15 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.