From: Wilco Dijkstra Date: Thu, 18 Jan 2018 16:37:44 +0000 (+0000) Subject: [AArch64] Fix fp16 test failures after PR82964 fix X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f7b87cad7c110dc656b4f201782819633dae2cf;p=gcc.git [AArch64] Fix fp16 test failures after PR82964 fix This fixes test failures in gcc.target/aarch64/f16_mov_immediate_*.c after fixing PR82964. The check for a scalar floating point constant didn't include 16-bit floating point modes, so use GET_MODE_CLASS instead. gcc/ PR target/82964 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Use GET_MODE_CLASS for scalar floating point. From-SVN: r256854 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f37ed18192..1341714cc95 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-18 Wilco Dijkstra + + PR target/82964 + * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): + Use GET_MODE_CLASS for scalar floating point. + 2018-01-18 Jan Hubicka PR ipa/82256 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 17efac7a727..174310c9f1b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11757,8 +11757,7 @@ aarch64_legitimate_constant_p (machine_mode mode, rtx x) { /* Support CSE and rematerialization of common constants. */ if (CONST_INT_P (x) - || (CONST_DOUBLE_P (x) - && (mode == SFmode || mode == DFmode || mode == TFmode)) + || (CONST_DOUBLE_P (x) && GET_MODE_CLASS (mode) == MODE_FLOAT) || GET_CODE (x) == CONST_VECTOR) return true;