This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed][AArch64] Fix fp16 test failures after PR82964 fix
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: nd <nd at arm dot com>, Christophe Lyon <christophe dot lyon at linaro dot org>
- Date: Thu, 18 Jan 2018 16:41:39 +0000
- Subject: [Committed][AArch64] Fix fp16 test failures after PR82964 fix
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
This fixes test failures in gcc.target/aarch64/f16_mov_immediate_*.c
after fixing PR82964 (https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01636.html).
The check for a scalar floating point constant didn't include 16-bit floating point modes,
so use GET_MODE_CLASS instead.
This fixes the failures and has no effect otherwise. Committed as trivial fix.
ChangeLog:
2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
gcc/
PR target/82964
* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
Use GET_MODE_CLASS for scalar floating point.
--
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 671168cc3f32ac3f2669fc79835435fdf618a56d..c6a83c881038873d8b68e36f906783be63ddde56 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -11813,8 +11813,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;