llvm-project/llvm
Craig Topper 6b1b630a98 [SelectionDAG] Use known ones to provide a better bound for the known zeros for CTTZ/CTLZ operations.
This is the SelectionDAG version of D32521. If know where at least one 1 is located in the input to these intrinsics we can place an upper bound on the number of bits needed to represent the count and thus increase the number of known zeros in the output.

I think we can also refine this further for CTTZ_UNDEF/CTLZ_UNDEF by assuming that the answer will never be BitWidth. I've left this out for now because it caused other test failures across multiple targets. Usually because of turning ADD into OR based on this new information.

I'll fix CTPOP in a future patch.

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

llvm-svn: 301806
2017-05-01 16:08:06 +00:00
..
bindings [go bindings] Rmove duplicated conversion function definitions after r300843. 2017-04-20 19:06:11 +00:00
cmake limit to 2 parallel links when using thinlto 2017-04-28 20:17:15 +00:00
docs [docs] Simplify some language for Error/cantFail in the programmer's manual. 2017-04-30 17:24:52 +00:00
examples Module::getOrInsertFunction is using C-style vararg instead of variadic templates. 2017-04-11 15:01:18 +00:00
include Generalize the specialized flag-carrying SDNodes by moving flags into SDNode. 2017-05-01 15:17:51 +00:00
lib [SelectionDAG] Use known ones to provide a better bound for the known zeros for CTTZ/CTLZ operations. 2017-05-01 16:08:06 +00:00
projects
resources
runtimes [CMake][runtimes] Use -nodefaultlibs for the runtimes build 2017-04-13 21:29:03 +00:00
test [SelectionDAG] Use known ones to provide a better bound for the known zeros for CTTZ/CTLZ operations. 2017-05-01 16:08:06 +00:00
tools Remove unused private field. 2017-04-29 05:30:19 +00:00
unittests [APInt] Remove support for wrapping from APInt::setBits. 2017-04-30 07:45:01 +00:00
utils [globalisel][tablegen] Silence unused variable warning. 2017-04-29 19:10:19 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt Allow suppressing host and target info in VersionPrinter 2017-04-19 00:03:36 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Take code ownership of instruction scheduling. 2017-03-10 18:34:37 +00:00
CREDITS.TXT CODE_OWNERS: Take code ownership of instruction scheduling. 2017-03-10 18:34:37 +00:00
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.