Old fork of llvm-mirror, used on older RPCS3 builds
Go to file
Craig Topper 5b555fa10e [InstCombine] Teach visitICmpInst to not break integer absolute value idioms
Summary:
This patch adds an early out to visitICmpInst if we are looking at a compare as part of an integer absolute value idiom. Similar is already done for min/max.

In the particular case I observed in a benchmark we had an absolute value of a load from an indexed global. We simplified the compare using foldCmpLoadFromIndexedGlobal into a magic bit vector, a shift, and an and. But the load result was still used for the select and the negate part of the absolute valute idiom. So we overcomplicated the code and lost the ability to recognize it as an absolute value.

I've chosen a simpler case for the test here.

Reviewers: spatel, davide, majnemer

Reviewed By: spatel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317994 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-12 02:28:21 +00:00
bindings Update go bindings to use new functions from rL317135. 2017-11-02 10:22:26 +00:00
cmake Add a Cross-compilation toolchain file for MSVC. 2017-11-09 20:38:16 +00:00
docs [AMDGPU] Correct targets that support XNACK 2017-11-11 00:50:32 +00:00
examples Fix broken links to the Itanium CXX ABI 2017-09-12 00:19:11 +00:00
include [globalisel][tablegen] Import signextload and zeroextload. 2017-11-11 03:23:44 +00:00
lib [InstCombine] Teach visitICmpInst to not break integer absolute value idioms 2017-11-12 02:28:21 +00:00
projects [debuginfo-tests] Make debuginfo-tests work in a standard configuration. 2017-11-10 20:57:57 +00:00
resources
runtimes [CMake][runtimes] Fix the variable name 2017-11-08 23:44:27 +00:00
test [InstCombine] Teach visitICmpInst to not break integer absolute value idioms 2017-11-12 02:28:21 +00:00
tools [llvm-cvtres] Add support for ARM64 2017-11-10 22:27:41 +00:00
unittests [cfi-verify] Made FileAnalysis operate on a GraphResult rather than build one and validate it. 2017-11-10 21:00:22 +00:00
utils [globalisel][tablegen] Import signextload and zeroextload. 2017-11-11 03:23:44 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [debuginfo-tests] Make debuginfo-tests work in a standard configuration. 2017-11-10 20:57:57 +00:00
CODE_OWNERS.TXT Update my email addresses, NFC. 2017-10-26 10:16:54 +00:00
configure
CREDITS.TXT Add myself to CREDITS.txt 2017-09-18 14:33:39 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit access 2017-08-18 02:39:28 +00:00
RELEASE_TESTERS.TXT Update my email addresses, NFC. 2017-10-26 10:16:54 +00:00

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.