[AArch64] Fix PR81800
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 13 Aug 2019 10:46:44 +0000 (10:46 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Tue, 13 Aug 2019 10:46:44 +0000 (10:46 +0000)
commitfb802d91461a2d65e9618abb6298c6ca7d39e7d7
treebce0a294e66323ab75c094eaba864653b9fb6ffa
parent4aeb1ba7f62c1d680c819ae3e137c3bad6f520ca
[AArch64] Fix PR81800

PR81800 is about the lrint inline giving spurious FE_INEXACT exceptions.
The previous change for PR81800 didn't fix this: when lrint is disabled
in the backend, the midend will simply use llrint.  This actually makes
things worse since llrint now also ignores FE_INVALID exceptions!
The fix is to disable lrint/llrint on double if the size of a long is
smaller (ie. ilp32).

    gcc/
PR target/81800
* gcc/config/aarch64/aarch64.md (lrint): Disable lrint pattern if GPF
operand is larger than a long int.

    testsuite/
PR target/81800
* gcc.target/aarch64/no-inline-lrint_3.c: New test.

From-SVN: r274376
gcc/ChangeLog
gcc/config/aarch64/aarch64.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/no-inline-lrint_3.c [new file with mode: 0644]