Nice! One nit - can the extra "tree" argument be a "const_tree" ? - I'll defer to the maintainers on the use of C++ default arguments in the AArch64 backend. But LGTM.

--Alan

Charles Baylis wrote:
On 11 November 2014 15:25, Alan Lawrence <alan.lawre...@arm.com> wrote:
[Resending in gcc-patches-accepted form]

I'm working on a patch for vget_lane (that removes the be_checked_get_lane
thing which isn't an intrinsic). Other than that, no not yet - loads and
stores I was thinking to wait until David Sherwood + Alan Hayward's patches
have been settled, but there's still ARM, indeed.

If you have any way/ideas to get better error messages (i.e. line numbers),
that'd be particularly good, tho  :)

This is the best idea I have at the moment...

The attached patch starts to improve the error messages for NEON
intrinsics, by adding %K to the error message string, as suggested by
Jakub a while ago.

========== error message without this patch:
In file included from
/home/cbaylis/srcarea/gcc/gcc-git/gcc/testsuite/gcc.target/aarch64/simd/vqrdmulhq_laneq_s16_indices_1.c:3:0:
/tmp/arm_neon.h: In function ‘main’:
/tmp/arm_neon.h:12019:10: error: lane -1 out of range 0 - 7
   return __builtin_aarch64_sqrdmulh_laneqv8hi (__a, __b, __c);

========== error message with this patch (gives point of use of the
NEON intrinsic)
In file included from
/home/cbaylis/srcarea/gcc/gcc-git/gcc/testsuite/gcc.target/aarch64/simd/vqrdmulhq_laneq_s16_indices_1.c:3:0:
In function ‘vqrdmulhq_laneq_s16’,
    inlined from ‘main’ at
/home/cbaylis/srcarea/gcc/gcc-git/gcc/testsuite/gcc.target/aarch64/simd/vqrdmulhq_laneq_s16_indices_1.c:17:3:
/tmp/arm_neon.h:12019:10: error: lane -1 out of range 0 - 7
   return __builtin_aarch64_sqrdmulh_laneqv8hi (__a, __b, __c);


This patch depends on Alan's patch (upthread). If conflicts were
resolved, it could be applied without, but would have no effect.

OK for trunk?

Further clean up (more work like Alan's patch) is needed to address
the other intrinsics which have arguments with constant integer range
constraints (vget_lane/vset_lane/vldN_lane/vstN_lane/shifts. Richard,
Marcus: is such clean up suitable for after stage 1 closes?



<DATE>  Charles Baylis  <charles.bay...@linaro.org>

    * 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.c (aarch64_simd_lane_bounds): Add exp
    parameter. Report calling function in error message if exp is non-NULL.


Reply via email to