This is an archive of the discontinued LLVM Phabricator instance.

Extending undef support for float arithmetic to isFast IR flags
AbandonedPublic

Authored by mcberg2017 on May 16 2018, 12:43 PM.

Details

Summary

The patch addresses a single transform of selection DAG optimization, namely a few special cases of undef optimization, extending the guard for isFast on the SDNodeFlags passed to getNode for fadd, fsub, fmul, fdiv and frem.

Diff Detail

Event Timeline

mcberg2017 created this revision.May 16 2018, 12:43 PM
mcberg2017 added reviewers: spatel, hfinkel, arsenm.

This review is initially for discussion over the issues in undef that have yet to be resolved. I will change the patch as needed as we go.

mcberg2017 updated this revision to Diff 147192.EditedMay 16 2018, 3:05 PM

Updated test for addition of Flag information. I will remove SelectionDAGBuilder.cpp if D46968 gets checked in first or visa versa as the change is needed in both places for correct behavior.

Sorry if my earlier comment wasn't clear, but this is functionally wrong. These folds shouldn't depend on unsafe/fast at all...assuming we're going to use the same logic that we do in IR. I'm working on that patch. I think you can ignore this part of the FMF problem for now and work on independent parts of the puzzle?

mcberg2017 abandoned this revision.May 17 2018, 9:00 AM

Sorry if my earlier comment wasn't clear, but this is functionally wrong. These folds shouldn't depend on unsafe/fast at all...assuming we're going to use the same logic that we do in IR. I'm working on that patch.

For reference, here's that proposal:
D47026