hanchenye-llvm-project/llvm/lib
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
..
Analysis [SCEV] Use isKnownViaNonRecursiveReasoning for smax simplification 2019-05-01 15:58:24 +00:00
AsmParser [ThinLTO] Fix unreachable code when parsing summary entries. 2019-05-01 16:26:59 +00:00
BinaryFormat [XCOFF] Add functionality for parsing AIX XCOFF object file headers 2019-04-04 00:53:21 +00:00
Bitcode Use llvm::lower_bound. NFC 2019-04-12 02:02:06 +00:00
CodeGen [DAGCombiner] try repeated fdiv divisor transform before building estimate (2nd try) 2019-05-02 15:02:08 +00:00
DebugInfo [PDB] Fix hash function used to write /src/headerblock 2019-04-29 23:09:35 +00:00
Demangle llvm-undname: Fix assert-on->4GiB-string-literal, found by oss-fuzz 2019-04-24 16:09:38 +00:00
ExecutionEngine [ORC] Pass object buffer ownership back in NotifyEmitted. 2019-05-01 22:40:23 +00:00
FuzzMutate [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
Fuzzer
IR [DebugInfo] DW_OP_deref_size in PrologEpilogInserter. 2019-04-30 07:58:57 +00:00
IRReader [IRReader] Expose getLazyIRModule 2019-02-11 22:01:13 +00:00
LTO [ThinLTO] Adding architecture name into saved object filename 2019-04-29 21:39:54 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker [Linker] Fix crash handling appending linkage 2019-03-20 19:20:07 +00:00
MC Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
MCA [MCA] Add field `IsEliminated` to class Instruction. NFCI 2019-04-27 11:59:11 +00:00
Object [Object] Change getSectionName() to return Expected<StringRef> 2019-05-02 10:32:03 +00:00
ObjectYAML [WebAssembly] Support EXPLICIT_NAME symbols in llvm-readobj 2019-04-30 19:30:24 +00:00
Option Option spell checking: Penalize delimiter flags if input has no argument 2019-05-01 16:45:15 +00:00
Passes [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM 2019-04-23 18:56:19 +00:00
ProfileData Fix a few -Werror warnings: 2019-04-30 21:44:21 +00:00
Remarks [Remarks] Add string deduplication using a string table 2019-04-24 00:06:24 +00:00
Support [Support] Don't check MAP_ANONYMOUS, just use MAP_ANON 2019-05-02 05:58:09 +00:00
TableGen [TableGen] Fix null pointer dereferencing in token parser. 2019-04-30 13:09:55 +00:00
Target [SelectionDAG] remove constant folding limitations based on FP exceptions 2019-05-02 14:47:59 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI [TextAPI] Fix Symbol::dump which was failing to append the SymbolKind string. 2019-04-29 18:25:04 +00:00
ToolDrivers [llvm-ar][libObject] Fix relative paths when nesting thin archives. 2019-02-13 23:39:41 +00:00
Transforms remove inalloca parameters in globalopt and simplify argpromotion 2019-05-02 00:37:36 +00:00
WindowsManifest Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRay Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
CMakeLists.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00
LLVMBuild.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00