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