llvm-project/llvm
Sanjay Patel a003c728a5 [InstCombine] choose 1 form of abs and nabs as canonical
We already do this for min/max (see the blob above the diff), 
so we should do the same for abs/nabs.
A sign-bit check (<s 0) is used as a predicate for other IR 
transforms and it's likely the best for codegen.

This might solve the motivating cases for D47037 and D47041, 
but I think those patches still make sense. We can't guarantee 
this canonicalization if the icmp has more than one use.

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

llvm-svn: 332819
2018-05-20 14:23:23 +00:00
..
bindings [LLVM-C] Consolidate llgo's DIBuilder Bindings 2018-05-10 21:10:06 +00:00
cmake [cmake] Add a switch to enable/disable bindings. 2018-05-20 08:37:54 +00:00
docs Dissallow non-empty metadata for invariant.group 2018-05-18 23:53:46 +00:00
examples [ORC] Rewrite the VSO symbol table yet again. Update related utilities. 2018-05-16 22:24:30 +00:00
include [LLVM-C] Use Length-Providing Value Name Getters and Setters 2018-05-19 15:08:36 +00:00
lib [InstCombine] choose 1 form of abs and nabs as canonical 2018-05-20 14:23:23 +00:00
projects
resources
runtimes [CMake] Support runtimes in distributions 2018-05-17 16:58:44 +00:00
test [InstCombine] choose 1 form of abs and nabs as canonical 2018-05-20 14:23:23 +00:00
tools [LLVM-C] Use Length-Providing Value Name Getters and Setters 2018-05-19 15:08:36 +00:00
unittests Re-revert "[Option] Fix PR37006 prefix choice in findNearest" 2018-05-19 16:21:01 +00:00
utils Add Script to match open Phabricator reviews with potential reviewers. 2018-05-18 13:02:32 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
.gitignore
CMakeLists.txt [cmake] Add a switch to enable/disable bindings. 2018-05-20 08:37:54 +00:00
CODE_OWNERS.TXT [CODE_OWNERS] Update my email address. 2018-04-23 19:09:49 +00:00
CREDITS.TXT Update my email address and description. 2018-04-29 01:13:57 +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.