Go to file
Max Kazantsev 89554446e7 [ScalarEvolution] Re-enable Predicate implication from operations
The patch rL298481 was reverted due to crash on clang-with-lto-ubuntu build.
The reason of the crash was type mismatch between either a or b and RHS in the following situation:

  LHS = sext(a +nsw b) > RHS.

This is quite rare, but still possible situation. Normally we need to cast all {a, b, RHS} to their widest type.
But we try to avoid creation of new SCEV that are not constants to avoid initiating recursive analysis that
can take a lot of time and/or cache a bad value for iterations number. To deal with this, in this patch we
reject this case and will not try to analyze it if the type of sum doesn't match with the type of RHS. In this
situation we don't need to create any non-constant SCEVs.

This patch also adds an assertion to the method IsProvedViaContext so that we could fail on it and not
go further into range analysis etc (because in some situations these analyzes succeed even when the passed
arguments have wrong types, what should not normally happen).

The patch also contains a fix for a problem with too narrow scope of the analysis caused by wrong
usage of predicates in recursive invocations.

The regression test on the said failure: test/Analysis/ScalarEvolution/implied-via-addition.ll

llvm-svn: 298690
2017-03-24 06:19:00 +00:00
clang Fix handling of initialization from parenthesized initializer list. 2017-03-24 01:14:25 +00:00
clang-tools-extra [clang-tidy] Fix treating non-space whitespaces in checks list. 2017-03-23 16:32:06 +00:00
compiler-rt [XRay] [compiler-rt] Plug a file descriptor leak in a failure case. 2017-03-24 05:02:51 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx Implement P0298R3: 'std::byte'. Reviewed as https://reviews.llvm.org/D31022 2017-03-24 05:45:39 +00:00
libcxxabi Fully Reformat fallback_malloc.cpp 2017-03-04 03:23:15 +00:00
libunwind DarwinParser: include limits 2017-03-14 15:17:55 +00:00
lld Return early. 2017-03-24 01:13:30 +00:00
lldb Fix warnings from clang build on macOS. 2017-03-23 09:52:26 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [ScalarEvolution] Re-enable Predicate implication from operations 2017-03-24 06:19:00 +00:00
openmp GOMP compatibility: add missing OpenMP4.0 task deps handling code 2017-03-23 15:03:17 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopInfo] Introduce ScopStmt::contains(BB*). NFC. 2017-03-23 16:12:21 +00:00