[PATCH] D46854: [DAG] propagate FMF for all FPMathOperators
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 15:48:20 PDT 2018
spatel created this revision.
spatel added reviewers: mcberg2017, arsenm, wristow, hfinkel.
Herald added subscribers: wdng, nemanjai, mcrosier.
Herald added a reviewer: javed.absar.
This is a simple hack based on what's proposed in https://reviews.llvm.org/D37686, but we can extend it if needed in follow-ups. It gets us most of the FMF functionality that we want without adding any state bits to the flags. It also intentionally leaves out non-FMF flags (nsw, etc) to minimize the patch.
It should provide a superset of the functionality from https://reviews.llvm.org/D46563 - the extra tests show propagation and codegen diffs for fcmp, vecreduce, and FP libcalls.
The PPC log2() test shows the limits of this most basic approach - we only applied 'afn' to the last node created for the call. AFAIK, there aren't any libcall optimizations based on the flags currently, so that shouldn't make any difference.
https://reviews.llvm.org/D46854
Files:
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
test/CodeGen/AArch64/vecreduce-propagate-sd-flags.ll
test/CodeGen/ARM/fp16-instructions.ll
test/CodeGen/PowerPC/fmf-propagation.ll
test/CodeGen/X86/fmaxnum.ll
test/CodeGen/X86/fminnum.ll
test/CodeGen/X86/pr34149.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46854.146703.patch
Type: text/x-patch
Size: 14446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180514/0a7a2ac7/attachment.bin>
More information about the llvm-commits
mailing list