1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Go to file
Nikita Popov 54bcf692a3 [ConstantRange] Add sdiv() support
The implementation is conceptually simple: We separate the LHS and
RHS into positive and negative components and then also compute the
positive and negative components of the result, taking into account
that e.g. only pos/pos and neg/neg will give a positive result.

However, there's one significant complication: SignedMin / -1 is UB
for sdiv, and we can't just ignore it, because the APInt result of
SignedMin would break the sign segregation. Instead we drop SignedMin
or -1 from the corresponding ranges, taking into account some edge
cases with wrapped ranges.

Because of the sign segregation, the implementation ends up being
nearly fully precise even for wrapped ranges (the remaining
imprecision is due to ranges that are both signed and unsigned
wrapping and are divided by a trivial divisor like 1). This means
that the testing cannot just check the signed envelope as we
usually do. Instead we collect all possible results in a bitvector
and construct a better sign wrapped range (than the full envelope).

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

llvm-svn: 362430
2019-06-03 18:19:54 +00:00
benchmarks
bindings Fix bad go bindings test. 2019-05-31 03:45:11 +00:00
cmake tools: add llvm-nm and llvm-objcopy to tools 2019-06-03 17:17:09 +00:00
docs Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
examples Add a HowToUseLLJIT example project. 2019-05-22 21:38:41 +00:00
include [ConstantRange] Add sdiv() support 2019-06-03 18:19:54 +00:00
lib [ConstantRange] Add sdiv() support 2019-06-03 18:19:54 +00:00
projects Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
resources
runtimes [CMake] Use libtool for runtimes when building for Apple platform 2019-06-02 02:05:01 +00:00
test Fix a crash when the default of a switch is removed 2019-06-03 17:54:15 +00:00
tools [PDB] Copy inlinee lines records into the PDB 2019-06-03 18:15:38 +00:00
unittests [ConstantRange] Add sdiv() support 2019-06-03 18:19:54 +00:00
utils gn build: Merge r362352 2019-06-03 18:13:29 +00:00
.arcconfig
.clang-format
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitattributes
.gitignore [clangd] Store index in '.clangd/index' instead of '.clangd-index' 2019-02-20 19:08:06 +00:00
CMakeLists.txt Unbreak non-PIC builds after r362390 / D62720 2019-06-03 13:39:49 +00:00
CODE_OWNERS.TXT [llvm-mca] Move llvm-mca library to llvm/lib/MCA. 2018-12-17 08:08:31 +00:00
configure
CREDITS.TXT [test commit] Add my name to the CREDITS.TXT 2019-05-27 07:48:28 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm.spec.in Update structured references to the license to the new license. 2019-01-19 11:30:51 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.txt Testing commit access 2019-02-19 20:38:51 +00:00
RELEASE_TESTERS.TXT Update the list of platforms & archs 2018-12-16 14:47:16 +00:00

The LLVM Compiler Infrastructure
================================

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.