Page MenuHomePhabricator

[SelectionDAG] Support result type promotion for FLT_ROUNDS_

Authored by lewis-revill on Oct 29 2018, 9:02 AM.



For targets where i32 is not a legal type (e.g. 64-bit RISC-V), LegalizeIntegerTypes must promote the result of ISD::FLT_ROUNDS_.

Diff Detail


Event Timeline

lewis-revill created this revision.Oct 29 2018, 9:02 AM
efriedma accepted this revision.Oct 29 2018, 12:08 PM
efriedma added a subscriber: efriedma.


This revision is now accepted and ready to land.Oct 29 2018, 12:08 PM

Alex, can you rebase this one, it does not apply cleanly.

asb accepted this revision.Nov 30 2018, 5:14 AM

LGTM. Needs a trivial tweak to apply. This can land now the RV64I patch was committed. I'll commit now (I believe Lewis doesn't have commit access).

Thanks Lewis!

We should probably have a proper lowering of FLT_ROUNDS_ at some point. Looks like GCC currently always returns 1 as well, rather than reading the appropriate CSR.

This revision was automatically updated to reflect the committed changes.