From: Charles Baylis Date: Thu, 20 Nov 2014 16:26:54 +0000 (+0000) Subject: re PR target/63870 ([Aarch64] [ARM] Errors in use of NEON intrinsics are reported... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46ed60245a76b90e6161134fc6a22480aa1248fe;p=gcc.git re PR target/63870 ([Aarch64] [ARM] Errors in use of NEON intrinsics are reported incorrectly) PR target/63870 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Pass expression to aarch64_simd_lane_bounds. * config/aarch64/aarch64-protos.h (aarch64_simd_lane_bounds): Update prototype. * config/aarch64/aarch64-simd.md: (aarch64_combinez): Update call to aarch64_simd_lane_bounds. (aarch64_get_lanedi): Likewise. (aarch64_ld2_lane): Likewise. (aarch64_ld3_lane): Likewise. (aarch64_ld4_lane): Likewise. (aarch64_im_lane_boundsi): Likewise. * config/aarch64/aarch64.c (aarch64_simd_lane_bounds): Add exp parameter. Report calling function in error message if exp is non-NULL. From-SVN: r217885 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 051e275272b..3cbdb6f5376 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2014-11-20 Charles Baylis + + PR target/63870 + * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Pass + expression to aarch64_simd_lane_bounds. + * config/aarch64/aarch64-protos.h (aarch64_simd_lane_bounds): Update + prototype. + * config/aarch64/aarch64-simd.md: (aarch64_combinez): Update + call to aarch64_simd_lane_bounds. + (aarch64_get_lanedi): Likewise. + (aarch64_ld2_lane): Likewise. + (aarch64_ld3_lane): Likewise. + (aarch64_ld4_lane): Likewise. + (aarch64_im_lane_boundsi): Likewise. + * config/aarch64/aarch64.c (aarch64_simd_lane_bounds): Add exp + parameter. Report calling function in error message if exp is non-NULL. + 2014-11-20 Segher Boessenkool PR target/60111 diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index 2637c71c3f4..e9c4c85fd3f 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -909,7 +909,7 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval, { enum machine_mode vmode = mode[argc - 1]; aarch64_simd_lane_bounds (op[argc], - 0, GET_MODE_NUNITS (vmode)); + 0, GET_MODE_NUNITS (vmode), exp); /* Keep to GCC-vector-extension lane indices in the RTL. */ op[argc] = GEN_INT (ENDIAN_LANE_N (vmode, INTVAL (op[argc]))); } diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 8ef6401ab3c..52e97e745a0 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -268,7 +268,7 @@ void aarch64_simd_emit_pair_result_insn (machine_mode, /* Expand builtins for SIMD intrinsics. */ rtx aarch64_simd_expand_builtin (int, tree, rtx); -void aarch64_simd_lane_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT); +void aarch64_simd_lane_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT, const_tree); void aarch64_split_128bit_move (rtx, rtx); diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index 2e71cb957d7..23345b1df1e 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -2436,7 +2436,7 @@ (match_operand:SI 2 "immediate_operand")] "TARGET_SIMD" { - aarch64_simd_lane_bounds (operands[2], 0, 1); + aarch64_simd_lane_bounds (operands[2], 0, 1, NULL); emit_move_insn (operands[0], operands[1]); DONE; }) @@ -4366,7 +4366,8 @@ machine_mode mode = mode; rtx mem = gen_rtx_MEM (mode, operands[1]); - aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode)); + aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode), + NULL); emit_insn (gen_aarch64_vec_load_lanesoi_lane (operands[0], mem, operands[2], @@ -4385,7 +4386,8 @@ machine_mode mode = mode; rtx mem = gen_rtx_MEM (mode, operands[1]); - aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode)); + aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode), + NULL); emit_insn (gen_aarch64_vec_load_lanesci_lane (operands[0], mem, operands[2], @@ -4404,7 +4406,8 @@ machine_mode mode = mode; rtx mem = gen_rtx_MEM (mode, operands[1]); - aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode)); + aarch64_simd_lane_bounds (operands[3], 0, GET_MODE_NUNITS (mode), + NULL); emit_insn (gen_aarch64_vec_load_lanesxi_lane (operands[0], mem, operands[2], @@ -4554,7 +4557,7 @@ (match_operand:SI 1 "immediate_operand" "i")] "TARGET_SIMD" { - aarch64_simd_lane_bounds (operands[0], 0, INTVAL (operands[1])); + aarch64_simd_lane_bounds (operands[0], 0, INTVAL (operands[1]), NULL); DONE; } ) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 2d8f48d1199..18095136648 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -8403,14 +8403,20 @@ aarch64_simd_check_vect_par_cnst_half (rtx op, machine_mode mode, /* Bounds-check lanes. Ensure OPERAND lies between LOW (inclusive) and HIGH (exclusive). */ void -aarch64_simd_lane_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high) +aarch64_simd_lane_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high, + const_tree exp) { HOST_WIDE_INT lane; gcc_assert (CONST_INT_P (operand)); lane = INTVAL (operand); if (lane < low || lane >= high) - error ("lane %ld out of range %ld - %ld", lane, low, high - 1); + { + if (exp) + error ("%Klane %ld out of range %ld - %ld", exp, lane, low, high - 1); + else + error ("lane %ld out of range %ld - %ld", lane, low, high - 1); + } } /* Emit code to place a AdvSIMD pair result in memory locations (with equal