On 08/01/16 12:10, Kyrill Tkachov wrote:
Hi Kugan,

On 08/01/16 12:07, Kugan wrote:
neon_vld1<mode> pattern does not accept eliminable registers and due to
this, testcase in PR ICE. The problem is in arm_expand_neon_args, in the
NEON_ARG_MEMORY case, where it call force_reg.  Since an eliminable reg
is already a reg, it just returns that value, and we get the wrong
result.  It needs to call copy_to_mode_reg instead, like
arm_expand_binop_builtin does. Attached patch does this. Regression
tested on arm-none-linux-gnu with no new regression. Is this OK for trunk?

I see this also fails on GCC 5.
Could you test this on that branch too please.

Thanks,
Kugan

gcc/ChangeLog:

2016-01-08  Kugan Vivekanandarajah  <kug...@linaro.org>
        Jim Wilson  <jim.wil...@linaro.org>

    PR target/69194
    * config/arm/arm-builtins.c (arm_expand_neon_args): Call
     copy_to_mode_reg instead of force_reg.

gcc/testsuite/ChangeLog:

2016-01-08  Kugan Vivekanandarajah  <kug...@linaro.org>

    PR target/69194
    * gcc.target/arm/pr69194.C: New test.

I notice in the testcase we have:

+    void vld1q_f32(const float *__a) { __builtin_neon_vld1v4sf(__a); }

We don't support using the neon builtins directly.
Could you try replacing it with the appropriate intrinsic from arm_neon.h?
I think this would be vld1q_f32.

Err, I see that's just the inline declaration of it...
Sorry for the noise, please ignore this comment.

Kyrill


Thanks,
Kyrill


Reply via email to