Bootstrapped and regression tested on releases/gcc-11 on aarch64. Ok for 11?
Previous commit broke build as it relied on directly_supported_p which
is not in 11. This reworks to avoid using directly_supported_p.
gcc/ChangeLog:
PR bootstrap/103688
* tree-vect-loop.c (vectorizable_induction): Rework to avoid
directly_supported_p
From: Joel Hutton <[email protected]>
Sent: 13 December 2021 15:02
To: Richard Biener <[email protected]>; [email protected];
Tobias Burnus <[email protected]>; Richard Sandiford
<[email protected]>
Cc: Richard Biener <[email protected]>
Subject: Re: GCC 11 backport does not build (no "directly_supported_p") - was:
Re: pr103523: Check for PLUS/MINUS support
My mistake, reworked patch. Tests are still running.
________________________________
From: Richard Biener
<[email protected]<mailto:[email protected]>>
Sent: 13 December 2021 14:47
To: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>; Tobias Burnus
<[email protected]<mailto:[email protected]>>; Joel Hutton
<[email protected]<mailto:[email protected]>>; Richard Sandiford
<[email protected]<mailto:[email protected]>>
Cc: GCC Patches <[email protected]<mailto:[email protected]>>;
Richard Biener <[email protected]<mailto:[email protected]>>
Subject: Re: GCC 11 backport does not build (no "directly_supported_p") - was:
Re: pr103523: Check for PLUS/MINUS support
On December 13, 2021 3:27:50 PM GMT+01:00, Tobias Burnus
<[email protected]<mailto:[email protected]>> wrote:
>Hi Joel,
>
>your patch fails here with:
>
>../../repos/gcc-11-commit/gcc/tree-vect-loop.c:8000:8: error:
>'directly_supported_p' was not declared in this scope
> 8000 | if (!directly_supported_p (PLUS_EXPR, step_vectype)
> | ^~~~~~~~~~~~~~~~~~~~
>
>And "git grep" shows that this is only present in:
>
>gcc/tree-vect-loop.c: if (!directly_supported_p (PLUS_EXPR, step_vectype)
>gcc/tree-vect-loop.c: || !directly_supported_p (MINUS_EXPR,
>step_vectype))
>
>That's different on mainline, which offers that function.
Just as a reminder, backports need regular bootstrap and regtest validation on
the respective branches.
Richard.
>Tobias
>
>On 10.12.21 14:24, Joel Hutton via Gcc-patches wrote:
>> ok for backport to 11?
>> ________________________________
>> From: Richard Sandiford
>> <[email protected]<mailto:[email protected]>>
>> Sent: 10 December 2021 10:22
>> To: Joel Hutton <[email protected]<mailto:[email protected]>>
>> Cc: GCC Patches <[email protected]<mailto:[email protected]>>;
>> Richard Biener <[email protected]<mailto:[email protected]>>
>> Subject: Re: pr103523: Check for PLUS/MINUS support
>>
>> Joel Hutton <[email protected]<mailto:[email protected]>> writes:
>>> Hi all,
>>>
>>> This is to address pr103523.
>>>
>>> bootstrapped and regression tested on aarch64.
>>>
>>> Check for PLUS_EXPR/MINUS_EXPR support in vectorizable_induction.
>>> PR103523 is an ICE on valid code:
>>>
>>> void d(float *a, float b, int c) {
>>> float e;
>>> for (; c; c--, e += b)
>>> a[c] = e;
>>> }
>>>
>>> This is due to not checking for PLUS_EXPR support, which is missing in
>>> VNx2sf mode. This causes an ICE at expand time. This patch adds a check
>>> for support in vectorizable_induction.
>>>
>>> gcc/ChangeLog:
>>>
>>> PR tree-optimization/PR103523
>> The bugzilla hook expects: PR tree-optimization/103523
>>
>>> * tree-vect-loop.c (vectorizable_induction): Check for
>>> PLUS_EXPR/MINUS_EXPR support.
>> OK, thanks.
>>
>> Richard
>-----------------
>Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
>München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
>Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
>München, HRB 106955
0001-vect-loop-fix-build.patch
Description: 0001-vect-loop-fix-build.patch
