hanchenye-llvm-project/llvm
Sanjay Patel 1972826178 [DAGCombiner] try repeated fdiv divisor transform before building estimate (2nd try)
The original patch was committed at rL359398 and reverted at rL359695 because of
infinite looping.

This includes a fix to check for a vector splat of "1.0" to avoid the infinite loop.

Original commit message:

This was originally part of D61028, but it's an independent diff.

If we try the repeated divisor reciprocal transform before producing an estimate sequence,
then we have an opportunity to use scalar fdiv. On x86, the trade-off is 1 divss vs. 5
vector FP ops in the default estimate sequence. On recent chips (Skylake, Ryzen), the
full-precision division is only 3 cycle throughput, so that's probably the better perf
default option and avoids problems from x86's inaccurate estimates.

The last 2 tests show that users still have the option to override the defaults by using
the function attributes for reciprocal estimates, but those patterns are potentially made
faster by converting the vector ops (including ymm ops) to scalar math.

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

llvm-svn: 359793
2019-05-02 15:02:08 +00:00
..
benchmarks
bindings [OCaml] Update api to account for FNeg and CallBr instructions 2019-04-16 15:00:19 +00:00
cmake Add llvm-profdata to LLVM_TOOLCHAIN_TOOLS 2019-04-30 15:35:16 +00:00
docs FileCheck [4/12]: Introduce @LINE numeric expressions 2019-05-02 00:04:38 +00:00
examples [JITLink] Update BuildingAJIT tutorials to account for API changes in r358818. 2019-04-20 17:35:28 +00:00
include [SelectionDAG] remove constant folding limitations based on FP exceptions 2019-05-02 14:47:59 +00:00
lib [DAGCombiner] try repeated fdiv divisor transform before building estimate (2nd try) 2019-05-02 15:02:08 +00:00
projects
resources
runtimes [CMake] Replace the sanitizer support in runtimes build with multilib 2019-04-22 23:31:39 +00:00
test [DAGCombiner] try repeated fdiv divisor transform before building estimate (2nd try) 2019-05-02 15:02:08 +00:00
tools [llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default stripping) 2019-05-02 11:53:02 +00:00
unittests Object/Minidump: Add support for the ThreadList stream 2019-05-02 07:45:42 +00:00
utils Revert r359717, "Make check-clang depend on the clang-check binary always" 2019-05-01 23:32:38 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [CMake] Move configuration of LLVM_CXX_STD to HandleLLVMOptions.cmake 2019-04-09 08:14:32 +00:00
CODE_OWNERS.TXT
CREDITS.TXT add Qiu Chaofan (qiucf@cn.ibm.com) to the CREDITS.txt 2019-04-23 02:37:48 +00:00
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.