llvm-project/llvm
Sanjay Patel af0babc90a [InstCombine] fold copysign with constant sign argument to (fneg+)fabs
If the sign of the sign argument is known (this could be extended to use ValueTracking),
then we can use fneg+fabs to clear/set the sign bit of the magnitude argument.
http://llvm.org/docs/LangRef.html#llvm-copysign-intrinsic

This transform is already done in DAGCombiner, but we can do it sooner in IR as
suggested in PR44153:
https://bugs.llvm.org/show_bug.cgi?id=44153

We have effectively no analysis for copysign in IR, so we are taking the unusual step
of increasing the number of IR instructions for the negative constant case.

Differential Revision: https://reviews.llvm.org/D70792
2019-12-02 09:23:12 -05:00
..
benchmarks
bindings [Test] Fix freeze ocaml test failure 2019-11-22 22:34:37 +09:00
cmake build: avoid hardcoding the libxml2 library name 2019-11-27 12:36:25 -08:00
docs [llvm-objcopy][MachO] Implement --dump-section 2019-11-25 12:30:37 +09:00
examples [ORC] Add a runAsMain utility function to ExecutionUtils. 2019-12-02 01:52:52 -08:00
include [ARM][MVE][Intrinsics] Add VMINQ/VMAXQ/VMINNMQ/VMAXNMQ intrinsics. 2019-12-02 11:18:53 +00:00
lib [InstCombine] fold copysign with constant sign argument to (fneg+)fabs 2019-12-02 09:23:12 -05:00
projects
resources
runtimes
test [InstCombine] fold copysign with constant sign argument to (fneg+)fabs 2019-12-02 09:23:12 -05:00
tools [X86] Add initialization of FPCW in llvm-exegesis 2019-12-02 20:18:35 +08:00
unittests [ORC][JITLink] Add support for weak references, and improve handling of static 2019-11-28 13:30:49 -08:00
utils [update_cc_test_checks.py] Handle extern "C" and namespaces 2019-12-02 11:06:31 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert "[Examples] Add IRTransformations directory to examples." 2019-12-01 22:20:20 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

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.