From 0d8e1702cfe8da6c3af6485aaba8c3d006cd3791 Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Tue, 27 Oct 2015 18:30:55 +0000 Subject: [PATCH] [AArch64] Handle vector float modes properly in aarch64_output_simd_mov_immediate * config/aarch64/aarch64.c (aarch64_output_simd_mov_immediate): Handle floating point inner modes properly. From-SVN: r229454 --- gcc/ChangeLog | 5 +++++ gcc/config/aarch64/aarch64.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f26446c..ac7bba4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-27 Kyrylo Tkachov + + * config/aarch64/aarch64.c (aarch64_output_simd_mov_immediate): + Handle floating point inner modes properly. + 2015-10-27 Alan Hayward * tree-vect-looop.c diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 4965041..5c8604f 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11450,9 +11450,11 @@ aarch64_output_simd_mov_immediate (rtx const_vector, lane_count = width / info.element_width; mode = GET_MODE_INNER (mode); - if (mode == SFmode || mode == DFmode) + if (GET_MODE_CLASS (mode) == MODE_FLOAT) { gcc_assert (info.shift == 0 && ! info.mvn); + /* For FP zero change it to a CONST_INT 0 and use the integer SIMD + move immediate path. */ if (aarch64_float_const_zero_rtx_p (info.value)) info.value = GEN_INT (0); else @@ -11476,6 +11478,7 @@ aarch64_output_simd_mov_immediate (rtx const_vector, mnemonic = info.mvn ? "mvni" : "movi"; shift_op = info.msl ? "msl" : "lsl"; + gcc_assert (CONST_INT_P (info.value)); if (lane_count == 1) snprintf (templ, sizeof (templ), "%s\t%%d0, " HOST_WIDE_INT_PRINT_HEX, mnemonic, UINTVAL (info.value)); -- 2.7.4