This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed][AArch64] Fix fp16 test failures after PR82964 fix


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]