On Thu, Aug 14, 2025 at 3:53 PM Vineet Gupta <vine...@rivosinc.com> wrote: > > On 8/14/25 15:11, Andrew Waterman wrote: > >> Yes it needed adjustment due to additional save/restore. Fixed that and > >> will > >> push shortly. > > While you're at it, does it make sense to skip the flag save/restore > > if !flag_trapping_math? It's an admittedly minor point, since the > > non-Zfa case is more about correctness than it is about performance, > > but if it's easy to do, you might as well. > > Sure, its easy enough. FWIW it seems to be one of the things checked already > to > gate the pattern, but once inside we can check again for the flags > specifically. > > (define_expand "<round_pattern><ANYF:mode>2" > [(set (match_operand:ANYF 0 "register_operand" "=f") > (unspec:ANYF > [(match_operand:ANYF 1 "register_operand" " f")] > ROUND))] > "(TARGET_HARD_FLOAT > && (TARGET_ZFA || flag_fp_int_builtin_inexact || !flag_trapping_math) > <------ > && (TARGET_ZFA || TARGET_64BIT || <ANYF:MODE>mode != DFmode) > && (TARGET_ZFA || <ANYF:MODE>mode != HFmode))" > > I'll submit a v2 so that CI pre-commit can give it a spin !
Cool, thank you. > > Thx, > -Vineet