Go to file
Sanjay Patel 3eaf500a6d [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
clang [NFC] cosmetic tweaks to ExprMutationAnalyzer to be more consistent 2018-09-15 21:38:18 +00:00
clang-tools-extra Mark index-tools.test as REQUIRES: shell so that it does not run with the internal lit shell which does not support "if" 2018-09-14 20:51:07 +00:00
compiler-rt [XRay] Remove the unused variable 2018-09-15 06:25:17 +00:00
debuginfo-tests Revert "(Retry) Add a basic integration test for C++ smart pointers" 2018-08-20 19:53:33 +00:00
libclc configure: Rework support for gfx9+ devices that were added post LLVM 3.9 2018-09-15 22:02:01 +00:00
libcxx Mark LWG#3102 as complete. No code changes, but I updated a test or two 2018-09-13 02:23:52 +00:00
libcxxabi Merge Demangle change in r342330 to libcxxabi. 2018-09-15 18:25:49 +00:00
libunwind [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs. 2018-09-04 20:57:50 +00:00
lld [ELF] Use llvm::toLower instead of libc call tolower 2018-09-15 23:59:13 +00:00
lldb [lldb-mi] Correct regex in the symbol-list-lines test 2018-09-15 17:05:20 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [DAGCombiner] try to convert pow(x, 1/3) to cbrt(x) 2018-09-16 16:50:26 +00:00
openmp [OPENMP]Increment iterator when the loop is continued. 2018-09-11 17:16:26 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [ScopDetection] Use addUnknown for calls in the AliasSetTracker. 2018-09-11 23:48:14 +00:00
README.md

README.md

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.