public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/89049] [8/9/10/11 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
@ 2021-03-11 14:10 ` rguenth at gcc dot gnu.org
  2021-05-14  9:51 ` [Bug tree-optimization/89049] [9/10/11/12 " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-11 14:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|rguenth at gcc dot gnu.org         |unassigned at gcc dot gnu.org
      Known to fail|                            |11.0
   Last reconfirmed|2019-01-25 00:00:00         |2021-3-11
             Status|ASSIGNED                    |NEW

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Re-confirmed.  Note the same in-order reduction is profitable with SSE:

0x3704d70 *_3 1 times scalar_load costs 12 in body
0x3704d70 _4 + r_16 1 times scalar_stmt costs 12 in body

0x3825d80 _4 + r_16 4 times vec_to_scalar costs 16 in body
0x3825d80 _4 + r_16 4 times scalar_stmt costs 48 in body
0x3825d80 *_3 1 times unaligned_load (misalign -1) costs 12 in body

t4.c:1:53: note:  Cost model analysis:
  Vector inside of loop cost: 76
  Vector prologue cost: 0
  Vector epilogue cost: 0
  Scalar iteration cost: 24
  Scalar outside cost: 0
  Vector outside cost: 0
  prologue iterations: 0
  epilogue iterations: 0
  Calculated minimum iters for profitability: 0


bar:
.LFB0:
        .cfi_startproc
        leaq    4096(%rdi), %rax
        pxor    %xmm1, %xmm1
        .p2align 4,,10
        .p2align 3
.L2:
        movups  (%rdi), %xmm0
        addq    $16, %rdi
        addss   %xmm0, %xmm1
        movaps  %xmm0, %xmm2
        shufps  $85, %xmm0, %xmm2
        addss   %xmm2, %xmm1
        movaps  %xmm0, %xmm2
        unpckhps        %xmm0, %xmm2
        shufps  $255, %xmm0, %xmm0
        addss   %xmm2, %xmm1
        addss   %xmm0, %xmm1
        cmpq    %rdi, %rax
        jne     .L2
        cvttss2sil      %xmm1, %eax
        ret

iff the code in forwprop that decomposes loads of BLKmode vectors used only
by BIT_FIELD_REFs would be relaxed to cover all modes and TARGET_MEM_REFs
that are simple we'd get

.L2:
        addl    $1, %eax
        addss   (%rdi), %xmm0
        addss   4(%rdi), %xmm0
        addq    $16, %rdi
        addss   -8(%rdi), %xmm0
        addss   -4(%rdi), %xmm0
        cmpl    $256, %eax
        jne     .L2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/89049] [9/10/11/12 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
  2021-03-11 14:10 ` [Bug tree-optimization/89049] [8/9/10/11 Regression] Unexpected vectorization rguenth at gcc dot gnu.org
@ 2021-05-14  9:51 ` jakub at gcc dot gnu.org
  2021-06-01  8:12 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/89049] [9/10/11/12 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
  2021-03-11 14:10 ` [Bug tree-optimization/89049] [8/9/10/11 Regression] Unexpected vectorization rguenth at gcc dot gnu.org
  2021-05-14  9:51 ` [Bug tree-optimization/89049] [9/10/11/12 " jakub at gcc dot gnu.org
@ 2021-06-01  8:12 ` rguenth at gcc dot gnu.org
  2022-05-27  9:40 ` [Bug tree-optimization/89049] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/89049] [10/11/12/13 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-06-01  8:12 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:40 ` rguenth at gcc dot gnu.org
  2022-06-28 10:36 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/89049] [10/11/12/13 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-05-27  9:40 ` [Bug tree-optimization/89049] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:36 ` jakub at gcc dot gnu.org
  2023-05-30  8:19 ` [Bug tree-optimization/89049] [10/11/12/13/14 " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/89049] [10/11/12/13/14 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-06-28 10:36 ` jakub at gcc dot gnu.org
@ 2023-05-30  8:19 ` pinskia at gcc dot gnu.org
  2023-07-07 10:34 ` [Bug tree-optimization/89049] [11/12/13/14 " rguenth at gcc dot gnu.org
  2024-03-10  5:56 ` [Bug tree-optimization/89049] [11 " law at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-30  8:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

--- Comment #18 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the code generation in GCC 12+ seems decent.

The IR changed in fact.
GCC 11 has:

  vect__4.5_19 = MEM <vector(4) float> [(float *)_2];
  stmp_r_11.6_20 = BIT_FIELD_REF <vect__4.5_19, 32, 0>;
  stmp_r_11.6_21 = r_16 + stmp_r_11.6_20;
  stmp_r_11.6_22 = BIT_FIELD_REF <vect__4.5_19, 32, 32>;
  stmp_r_11.6_23 = stmp_r_11.6_21 + stmp_r_11.6_22;
  stmp_r_11.6_24 = BIT_FIELD_REF <vect__4.5_19, 32, 64>;
  stmp_r_11.6_25 = stmp_r_11.6_23 + stmp_r_11.6_24;
  stmp_r_11.6_26 = BIT_FIELD_REF <vect__4.5_19, 32, 96>;

While GCC 12+ does:

  _3 = &MEM <vector(4) float> [(float *)_2];
  stmp_r_11.7_26 = BIT_FIELD_REF <MEM <vector(4) float> [(float *)_3], 32, 96>;
  stmp_r_11.7_24 = BIT_FIELD_REF <MEM <vector(4) float> [(float *)_3], 32, 64>;
  stmp_r_11.7_22 = BIT_FIELD_REF <MEM <vector(4) float> [(float *)_3], 32, 32>;
  stmp_r_11.7_20 = BIT_FIELD_REF <MEM <vector(4) float> [(float *)_3], 32, 0>;

Which I think was done by r12-2728-g2724d1bba6b364 .

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/89049] [11/12/13/14 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2023-05-30  8:19 ` [Bug tree-optimization/89049] [10/11/12/13/14 " pinskia at gcc dot gnu.org
@ 2023-07-07 10:34 ` rguenth at gcc dot gnu.org
  2024-03-10  5:56 ` [Bug tree-optimization/89049] [11 " law at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/89049] [11 Regression] Unexpected vectorization
       [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2023-07-07 10:34 ` [Bug tree-optimization/89049] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-03-10  5:56 ` law at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-10  5:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89049

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu.org
            Summary|[11/12/13/14 Regression]    |[11 Regression] Unexpected
                   |Unexpected vectorization    |vectorization

--- Comment #20 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Per c#18.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-10  5:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-89049-4@http.gcc.gnu.org/bugzilla/>
2021-03-11 14:10 ` [Bug tree-optimization/89049] [8/9/10/11 Regression] Unexpected vectorization rguenth at gcc dot gnu.org
2021-05-14  9:51 ` [Bug tree-optimization/89049] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:12 ` rguenth at gcc dot gnu.org
2022-05-27  9:40 ` [Bug tree-optimization/89049] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:36 ` jakub at gcc dot gnu.org
2023-05-30  8:19 ` [Bug tree-optimization/89049] [10/11/12/13/14 " pinskia at gcc dot gnu.org
2023-07-07 10:34 ` [Bug tree-optimization/89049] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-10  5:56 ` [Bug tree-optimization/89049] [11 " law at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).