summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-extensions.swig
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-09-05 17:01:56 +0000
committerSanjay Patel <spatel@rotateright.com>2018-09-05 17:01:56 +0000
commitdbf52837fea5b9588f69632d5e067fa3e323de97 (patch)
tree609aca6333e43ff014770bcce3a60d0287350c80 /lldb/scripts/Python/python-extensions.swig
parent3daf3e707234309889a5c8b484c66ac2be0f7a45 (diff)
downloadbcm5719-llvm-dbf52837fea5b9588f69632d5e067fa3e323de97.tar.gz
bcm5719-llvm-dbf52837fea5b9588f69632d5e067fa3e323de97.zip
[DAGCombiner] try to convert pow(x, 0.25) to sqrt(sqrt(x))
This was proposed as an IR transform in D49306, but it was not clearly justifiable as a canonicalization. Here, we only do the transform when the target tells us that sqrt can be lowered with inline code. This is the basic case. Some potential enhancements are in the TODO comments: 1. Generalize the transform for other exponents (allow more than 2 sqrt calcs if that's really cheaper). 2. If we have less fast-math-flags, generate code to avoid -0.0 and/or INF. 3. Allow the transform when optimizing/minimizing size (might require a target hook to get that right). Note that by default, x86 converts single-precision sqrt calcs into sqrt reciprocal estimate with refinement. That codegen is controlled by CPU attributes and can be manually overridden. We have plenty of test coverage for that already, so I didn't bother to include extra testing for that here. AArch uses its full-precision ops in all cases (not sure if that's the intended behavior or not, but that should also be covered by existing tests). Differential Revision: https://reviews.llvm.org/D51630 llvm-svn: 341481
Diffstat (limited to 'lldb/scripts/Python/python-extensions.swig')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud