[Bug target/81800] [8 regression] on aarch64 ilp32 lrint should not be inlined as two instructions

wilco at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 12 19:54:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81800

Wilco <wilco at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |wilco at gcc dot gnu.org
         Resolution|FIXED                       |---

--- Comment #10 from Wilco <wilco at gcc dot gnu.org> ---
This isn't fixed since GCC now emits for the example (-mabi=ilp32 -O2
-fno-math-errno -ftrapping-math -fno-fp-int-builtin-inexact):

f:
        frintx  d0, d0
        fcvtzs  x0, d0
        ret

So it is now ignoring FE_INVALID. The underlying reason is the builtin
expansion of lrint automatically falls back to llrint if lrint optab doesn't
exist.

The fix is disabling lrint if the floating type size is larger than
sizeof(long) so the lrint library function is called instead.


More information about the Gcc-bugs mailing list