llvm-project/llvm
Max Kazantsev 0aaf8c16ac [IRCE] Fix buggy behavior in Clamp
Clamp function was too optimistic when choosing signed or unsigned min/max function for calculations.
In fact, `!IsSignedPredicate` guarantees us that `Smallest` and `Greatest` can be compared safely using unsigned
predicates, but we did not check this for `S` which can in theory be negative.

This patch makes Clamp use signed min/max for cases when it fails to prove `S` being non-negative,
and it adds a test where such situation may lead to incorrect conditions calculation.

Differential Revision: https://reviews.llvm.org/D36873

llvm-svn: 311205
2017-08-18 22:50:29 +00:00
..
bindings Update the Go bindings for r309426 (remove offset from llvm.dbg.value) 2017-07-28 22:44:44 +00:00
cmake [CMake][LLVM] Remove duplicated library mask. Broken clang linking against clangShared 2017-08-10 13:37:58 +00:00
docs [Lexicon] Add "GEP" 2017-08-18 15:35:53 +00:00
examples [ORC][Kaleidoscope] Update Chapter 1 of BuildingAJIT to incorporate recent ORC 2017-08-15 19:20:10 +00:00
include [llvm-dwarfdump] Hide .debug_str and DIE reference offsets in brief mode 2017-08-18 21:35:44 +00:00
lib [IRCE] Fix buggy behavior in Clamp 2017-08-18 22:50:29 +00:00
projects
resources
runtimes [CMake][runtimes] Support for building target variants 2017-08-16 19:13:45 +00:00
test [IRCE] Fix buggy behavior in Clamp 2017-08-18 22:50:29 +00:00
tools Reapply: [llvm-rc] Add basic RC scripts parsing ability. 2017-08-18 18:24:17 +00:00
unittests [Support] env vars with empty values on windows 2017-08-18 16:55:44 +00:00
utils [lit] support unsetting env variables (again!) 2017-08-18 17:32:57 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Remove RISCV from LLVM_ALL_TARGETS in CMakeLists.txt 2017-08-13 18:49:33 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt Test commit access 2017-08-18 02:39:28 +00:00
RELEASE_TESTERS.TXT [RelTest] Diana is doing both releases now 2017-07-14 08:33:52 +00:00
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.