Page MenuHomePhabricator

[DAG] propagate FMF for all FPMathOperators
ClosedPublic

Authored by spatel on May 14 2018, 3:48 PM.

Details

Summary

This is a simple hack based on what's proposed in 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 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.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel created this revision.May 14 2018, 3:48 PM
mcberg2017 accepted this revision.EditedMay 14 2018, 4:55 PM

This is simpler and easy to maintain.

This revision is now accepted and ready to land.May 14 2018, 4:55 PM
This revision was automatically updated to reflect the committed changes.