+2019-08-13 Wilco Dijkstra <wdijkstr@arm.com>
+
+ PR target/81800
+ * gcc/config/aarch64/aarch64.md (lrint): Disable lrint pattern if GPF
+ operand is larger than a long int.
+
2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
* machmode.h (opt_mode::else_mode): New function.
[(match_operand:GPI 0 "register_operand")
(match_operand:GPF 1 "register_operand")]
"TARGET_FLOAT
- && ((GET_MODE_SIZE (<GPF:MODE>mode) <= GET_MODE_SIZE (<GPI:MODE>mode))
+ && ((GET_MODE_BITSIZE (<GPF:MODE>mode) <= LONG_TYPE_SIZE)
|| !flag_trapping_math || flag_fp_int_builtin_inexact)"
{
rtx cvt = gen_reg_rtx (<GPF:MODE>mode);
+2019-08-13 Wilco Dijkstra <wdijkstr@arm.com>
+
+ PR target/81800
+ * gcc.target/aarch64/no-inline-lrint_3.c: New test.
+
2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve/init_2.c: Expect ld1rd to be used
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O3 -fno-math-errno -fno-fp-int-builtin-inexact" } */
+
+#define TEST(name, float_type, int_type, fn) void f_##name (float_type x) \
+{ \
+ volatile int_type b = __builtin_##fn (x); \
+}
+
+TEST (dld, double, long, lrint)
+TEST (flf, float , long, lrintf)
+
+TEST (did, double, int, lrint)
+TEST (fif, float , int, lrintf)
+
+/* { dg-final { scan-assembler-times "fcvtzs\tw\[0-9\]+, \[d,s\]\[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler-times "bl\tlrint" 2 } } */