1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/include/llvm
Sanjay Patel 3ea496a526 [DAGCombiner] try to convert pow(x, 1/3) to cbrt(x)
This is a follow-up suggested in D51630 and originally proposed as an IR transform in D49040.

Copying the motivational statement by @evandro from that patch:
"This transformation helps some benchmarks in SPEC CPU2000 and CPU2006, such as 188.ammp, 
447.dealII, 453.povray, and especially 300.twolf, as well as some proprietary benchmarks. 
Otherwise, no regressions on x86-64 or A64."

I'm proposing to add only the minimum support for a DAG node here. Since we don't have an 
LLVM IR intrinsic for cbrt, and there are no other DAG ways to create a FCBRT node yet, I 
don't think we need to worry about DAG builder, legalization, a strict variant, etc. We 
should be able to expand as needed when adding more functionality/transforms. For reference, 
these are transform suggestions currently listed in SimplifyLibCalls.cpp:

//   * cbrt(expN(X))  -> expN(x/3)
//   * cbrt(sqrt(x))  -> pow(x,1/6)
//   * cbrt(cbrt(x))  -> pow(x,1/9)

Also, given that we bail out on long double for now, there should not be any logical 
differences between platforms (unless there's some platform out there that has pow()
but not cbrt()).

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

llvm-svn: 342348
2018-09-16 16:50:26 +00:00
..
ADT STLExtras: Add some more algorithm wrappers 2018-09-13 00:02:03 +00:00
Analysis [LV] Move InterleaveGroup and InterleavedAccessInfo to VectorUtils.h (NFC) 2018-09-12 08:01:57 +00:00
AsmParser Fix -Wdocumentation warnings. NFCI. 2018-07-12 09:10:55 +00:00
BinaryFormat [WebAssembly] clang-format (NFC) 2018-09-05 01:27:38 +00:00
Bitcode [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative 2018-09-04 12:38:00 +00:00
CodeGen [DAGCombiner] try to convert pow(x, 1/3) to cbrt(x) 2018-09-16 16:50:26 +00:00
Config Add cmake option to disable minidumps, default it to off 2018-08-20 16:49:54 +00:00
DebugInfo Give InfoStreamBuilder an opt-in method to write a hash of the PDB as GUID. 2018-09-15 18:35:51 +00:00
Demangle Update microsoftDemangle() to work more like itaniumDemangle(). 2018-09-15 18:24:20 +00:00
ExecutionEngine [ORC] Merge ExecutionSessionBase with ExecutionSession by moving a couple of 2018-09-12 21:49:02 +00:00
FuzzMutate [llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpus 2018-02-05 11:05:47 +00:00
IR [DAGCombiner] try to convert pow(x, 1/3) to cbrt(x) 2018-09-16 16:50:26 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LineEditor
Linker Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
LTO Revert r342233. 2018-09-14 16:48:47 +00:00
MC Fix typos. NFC 2018-09-08 02:04:20 +00:00
Object [PDB] Emit old fpo data to the PDB file. 2018-09-12 21:02:01 +00:00
ObjectYAML [yaml2obj] - Add a support for changing EntSize. 2018-08-07 08:11:38 +00:00
Option [Option] Remove an unnecessary conversion function. 2018-05-05 06:05:31 +00:00
Passes [ThinLTO] Enable ThinLTO WholeProgramDevirt and LowerTypeTests in new PM 2018-07-19 14:51:32 +00:00
ProfileData [SampleFDO] Add FunctionOffsetTable in compact binary format profile. 2018-09-14 20:52:59 +00:00
Support Common infrastructure for reading a profile remapping file and building 2018-09-13 18:51:44 +00:00
TableGen [TableGen] Add a general-purpose JSON backend. 2018-07-11 08:40:19 +00:00
Target [SelectionDAG] Remove masked_gather/scatter from TargetSelectionDAG.td. 2018-08-29 04:45:33 +00:00
Testing/Support Add missing #include for Testing/Support/SupportHelpers.h 2018-09-06 20:01:06 +00:00
ToolDrivers
Transforms [VPlan] Implement initial vector code generation support for simple outer loops. 2018-09-14 00:36:00 +00:00
WindowsManifest
WindowsResource
XRay [XRay] Bug fixes for FDR custom event and arg-logging 2018-09-13 09:25:42 +00:00
CMakeLists.txt
InitializePasses.h Hot cold splitting pass 2018-09-07 15:03:49 +00:00
LinkAllIR.h Remove trailing space 2018-07-30 19:41:25 +00:00
LinkAllPasses.h [PGO] Control Height Reduction 2018-09-04 17:19:13 +00:00
module.modulemap Add new .def file introduced for BinaryFormat/MsgPack 2018-08-23 02:01:30 +00:00
module.modulemap.build [Modules] Add module for Config/llvm-config.h 2017-10-24 06:18:52 +00:00
Pass.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
PassAnalysisSupport.h Remove trailing space 2018-07-30 19:41:25 +00:00
PassInfo.h
PassRegistry.h Remove trailing space 2018-07-30 19:41:25 +00:00
PassSupport.h