i386: Do not constrain fmod and remainder patterns with flag_finite_math_only [PR108922]
commit8020c9c42349f51f75239b9d35a2be41848a97bd
authorUros Bizjak <ubizjak@gmail.com>
Mon, 27 Feb 2023 21:10:01 +0000 (27 22:10 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Mon, 27 Feb 2023 21:10:01 +0000 (27 22:10 +0100)
tree79b76fd7234177800d5fd7959bf7d37f0c82b282
parentab76d71179be6e4e09ee3d5b7e8fa4265717a34c
i386: Do not constrain fmod and remainder patterns with flag_finite_math_only [PR108922]

According to Intel ISA manual, fprem and fprem1 return NaN when invalid
arithmetic exception is generated. This is documented in Table 8-10 of the
ISA manual and makes these two instructions fully IEEE compatible.

The reverted patch was based on the data from table 3-30 and 3-31 of the
Intel ISA manual, where results in case of st(0) being infinity or
st(1) being 0 are not specified.

2023-02-27  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:

PR target/108922
Revert:
* config/i386/i386.md (fmodxf3): Enable for flag_finite_math_only only.
(fmod<mode>3): Ditto.
(fpremxf4_i387): Ditto.
(reminderxf3): Ditto.
(reminder<mode>3): Ditto.
(fprem1xf4_i387): Ditto.
gcc/config/i386/i386.md