On Tue, Feb 8, 2022 at 4:35 AM Maciej W. Rozycki <ma...@embecosm.com> wrote:
> gcc/ > * config/riscv/riscv.md (UNSPEC_FMIN, UNSPEC_FMAX): New > constants. > (fmin<mode>3, fmax<mode>3): New insns. > ... I tried testing on some of the hardware I have. Both the HiFive Unleashed (2018) and HiFive Unmatched (2021) implement the current definition of fmin/fmax. But the Allwinner Nezha (2021) implements the previous definition of fmin/fmax. SiFive was involved with the fmin/fmax change, so it isn't surprising that they implemented the new semantics before other companies. The Nezha board with the T-Head C906 is a popular one, so we do need to continue to support the 2017 spec, which your patch does with the HONORS_SNAN checks. I agree that we don't need to worry about spec versions older than that. This looks OK to me. I've got builds running in parallel on the Unleashed and Unmatched to test but that will take a couple of days and I don't expect any problems since you already tested it. I could do a build on the Nezha if I had to, but that would take at least a week as it is a much slower board and I'd rather not do that unless I have to. This is hardware implementing the older spec that you probably haven't tested though. Jim