[PATCH PR95254] aarch64: gcc generate inefficient code with fixed sve vector length

Tobias Burnus Tobias_Burnus@mentor.com
Mon Jun 8 13:49:17 GMT 2020


Hi,

I just observe that this patch causes our *nonbootstrap* builds
to fail; I have not yet looked into this nor tried a bootstrap
build.

gcc-mainline/gcc/expr.c: In function 'rtx_insn* emit_move_insn(rtx, rtx)':
gcc-mainline/gcc/expr.c:3830:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
    auto candidate_subreg_p = [&](rtx subreg) {
    ^
gcc-mainline/gcc/expr.c:3830:8: error: 'candidate_subreg_p' does not name a type
    auto candidate_subreg_p = [&](rtx subreg) {
         ^
gcc-mainline/gcc/expr.c:3838:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
    auto candidate_mem_p = [&](machine_mode innermode, rtx mem) {
    ^
gcc-mainline/gcc/expr.c:3838:8: error: 'candidate_mem_p' does not name a type
    auto candidate_mem_p = [&](machine_mode innermode, rtx mem) {
         ^
gcc-mainline/gcc/expr.c:3849:44: error: 'candidate_subreg_p' was not declared in this scope
    if (SUBREG_P (x) && candidate_subreg_p (x))
                                             ^
gcc-mainline/gcc/expr.c:3852:44: error: 'candidate_subreg_p' was not declared in this scope
    if (SUBREG_P (y) && candidate_subreg_p (y))
                                             ^
gcc-mainline/gcc/expr.c:3866:46: error: 'candidate_mem_p' was not declared in this scope
      && candidate_mem_p (GET_MODE (x_inner), y))

Tobias

On 6/2/20 4:44 AM, Yangfei (Felix) wrote:

> Hi,
>
>> -----Original Message-----
>> From: Richard Sandiford [mailto:richard.sandiford@arm.com]
>> Sent: Monday, June 1, 2020 4:47 PM
>> To: Yangfei (Felix) <felix.yang@huawei.com>
>> Cc: gcc-patches@gcc.gnu.org; Uros Bizjak <ubizjak@gmail.com>; Jakub
>> Jelinek <jakub@redhat.com>; Hongtao Liu <crazylht@gmail.com>; H.J. Lu
>> <hjl.tools@gmail.com>
>> Subject: Re: [PATCH PR95254] aarch64: gcc generate inefficient code with
>> fixed sve vector length
> Snip...
>
>> Sounds good.  Maybe at this point the x_inner and y_inner code is getting
>> complicated enough to put into a lambda too:
>>
>>    x_inner = ... (x);
>>    y_inner = ... (y);
>>
>> Just a suggestion though.
> Yes, that's a good suggestion.  I see the code becomes more cleaner with another lambda.
>
>> Yeah, looks good.
>>
>> Formatting nit though: multi-line conditions should be wrapped in (...),
>> i.e.:
>>
>>      return (...
>>              && ...
>>              && ...);
>>
> Done.  v6 patch is based on trunk 20200601.
> Bootstrapped and tested on aarch64-linux-gnu.
> Also bootstrapped on x86-64-linux-gnu with --enable-multilib (for building -m32 x86 libgcc).
> Regresssion test on x86-64-linux-gnu looks good except for the following failures which has been confirmed by x86 devs:
>
>> FAIL: gcc.target/i386/avx512f-vcvtps2ph-2.c (test for excess errors)
>> UNRESOLVED: gcc.target/i386/avx512f-vcvtps2ph-2.c compilation failed to produce executable
> 154803c154803
>
> Thanks,
> Felix
>
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter


More information about the Gcc-patches mailing list