[PATCH] D57434: Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X))
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 14:41:20 PST 2019
lebedev.ri added a comment.
LG in principle.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11852
// pow(-inf, 0.25) = +inf; sqrt(sqrt(-inf)) = NaN.
+ // pow(-0.0, 0.75) = +0.0; sqrt(-0.0) * sqrt(sqrt(-0.0)) = +0.0.
+ // pow(-inf, 0.75) = +inf; sqrt(-inf) * sqrt(sqrt(-inf)) = NaN.
----------------
Looks like this doesn't //need// to be guarded by `nsz` flag?
================
Comment at: llvm/test/CodeGen/X86/pow.75.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-- -debug 2>&1 | FileCheck %s
+
----------------
Why `-debug`, instead of checking the asm?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57434/new/
https://reviews.llvm.org/D57434
More information about the llvm-commits
mailing list