[PATCH] D128591: Transforms: Relax restrictions on pow(x, y) expansion
Paul Osmialowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 25 13:48:18 PDT 2022
pawosm01 created this revision.
pawosm01 added a reviewer: david-arm.
Herald added a subscriber: hiraditya.
Herald added a project: All.
pawosm01 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
In cases where y is an integer we currently only expand the `pow` call into a sequence of multiplies (and possibly a divide) when fast math is enabled. This is very restrictive as we don't need all of the elements of fast math. It's enough to check for associative math and finite math, which are the typical set of flags required to allow FP operations to be reordered and not care about NaNs of infinities.
On behalf of David Sherwood.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128591
Files:
llvm/include/llvm/IR/Instruction.h
llvm/include/llvm/IR/Operator.h
llvm/lib/IR/Instruction.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/pow-4.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128591.440011.patch
Type: text/x-patch
Size: 6631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220625/ce2fe817/attachment.bin>
More information about the llvm-commits
mailing list