public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/95309] New: [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes
@ 2020-05-25  4:53 law at redhat dot com
  2020-05-25  7:36 ` [Bug middle-end/95309] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: law at redhat dot com @ 2020-05-25  4:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95309
           Summary: [11 Regression] Many targets failing ssa-dom-cse-2.c
                    after vectorizer changes
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at redhat dot com
  Target Milestone: ---

Various ports have regressed the tree-ssa/ssa-dom-cse-2.c after this change:

commit a4b48fc47c3406b6f41be093c4615879b7006710
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 18 16:05:00 2020 +0200

    cost invariant nodes from vect_slp_analyze_node_operations SLP walk

    2020-05-19  Richard Biener  <rguenther@suse.de>

            * tree-vectorizer.h (_slp_tree::vectype): Add field.
            (SLP_TREE_VECTYPE): New.
            * tree-vect-slp.c (vect_create_new_slp_node): Initialize
            SLP_TREE_VECTYPE.
            (vect_create_new_slp_node): Likewise.
            (vect_prologue_cost_for_slp): Move here from tree-vect-stmts.c
            and simplify.
            (vect_slp_analyze_node_operations): Walk nodes children for
            invariant costing.
            (vect_get_constant_vectors): Use local scope op variable.
            * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Remove here.
            (vect_model_simple_cost): Adjust.
            (vect_model_store_cost): Likewise.
            (vectorizable_store): Likewise.

You should be able to see this on the iq2000-elf port (and many others).

I believe the test is supposed to verify that we're able to determine the
return
value statically after unrolling the loop.  It's unclear if the stores get in
the
way of cse-ing the assignment to _22 and _29 in the dump or if there's
something
else going on:

  MEM[(int *)&a] = { 0 };
  MEM[(int *)&a + 4B] = { 1 };
  MEM[(int *)&a + 8B] = { 2 };
  MEM[(int *)&a + 12B] = { 3 };
  MEM[(int *)&a + 16B] = { 4 };
  MEM[(int *)&a + 20B] = { 5 };
  MEM[(int *)&a + 24B] = { 6 };
  MEM[(int *)&a + 28B] = { 7 };
  _22 = a[0];
  _29 = a[1];
  sum_30 = _22 + _29;
  _36 = a[2];
  sum_37 = sum_30 + _36;
  _43 = a[3];
  sum_44 = sum_37 + _43;
  _50 = a[4];
  sum_51 = sum_44 + _50;
  _57 = a[5];
  sum_58 = sum_51 + _57;
  _64 = a[6];
  sum_65 = sum_58 + _64;
  _1 = a[7];
  sum_16 = _1 + sum_65;
  a ={v} {CLOBBER};
  return sum_16;

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

* [Bug middle-end/95309] [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes
  2020-05-25  4:53 [Bug middle-end/95309] New: [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes law at redhat dot com
@ 2020-05-25  7:36 ` rguenth at gcc dot gnu.org
  2020-05-25 11:13 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25  7:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
           Keywords|                            |missed-optimization
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-05-25
             Status|UNCONFIRMED                 |ASSIGNED

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

* [Bug middle-end/95309] [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes
  2020-05-25  4:53 [Bug middle-end/95309] New: [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes law at redhat dot com
  2020-05-25  7:36 ` [Bug middle-end/95309] " rguenth at gcc dot gnu.org
@ 2020-05-25 11:13 ` rguenth at gcc dot gnu.org
  2020-05-25 14:02 ` cvs-commit at gcc dot gnu.org
  2020-05-25 14:02 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25 11:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So SLP vectorization decides to vectorize the SImode stores with V1SImode
vector stores because the cited revision does not cost the constant as
SLP_TREE_NUMBER_OF_VEC_STMTS is zero for it.  That's because this wasn't
adjusted when changing what SLP node we pass in and we've never computed
SLP_TREE_NUMBER_OF_VEC_STMTS for invariants sofar.

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

* [Bug middle-end/95309] [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes
  2020-05-25  4:53 [Bug middle-end/95309] New: [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes law at redhat dot com
  2020-05-25  7:36 ` [Bug middle-end/95309] " rguenth at gcc dot gnu.org
  2020-05-25 11:13 ` rguenth at gcc dot gnu.org
@ 2020-05-25 14:02 ` cvs-commit at gcc dot gnu.org
  2020-05-25 14:02 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-25 14:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:dc0c0196340f7ac58b10d0042d7cea776d6f7864

commit r11-615-gdc0c0196340f7ac58b10d0042d7cea776d6f7864
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 25 13:06:03 2020 +0200

    tree-optimization/95309 - fix invariant SLP node costing

    This makes sure to compute SLP_TREE_NUMBER_OF_VEC_STMTS during SLP
    analysis even for invariant / external nodes so costing properly
    knows what to cost.

    2020-05-25  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/95309
            * tree-vect-slp.c (vect_get_constant_vectors): Move number
            of vector computation ...
            (vect_slp_analyze_node_operations): ... to analysis phase.

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

* [Bug middle-end/95309] [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes
  2020-05-25  4:53 [Bug middle-end/95309] New: [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes law at redhat dot com
                   ` (2 preceding siblings ...)
  2020-05-25 14:02 ` cvs-commit at gcc dot gnu.org
@ 2020-05-25 14:02 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25 14:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed (on ip2000-elf).

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

end of thread, other threads:[~2020-05-25 14:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  4:53 [Bug middle-end/95309] New: [11 Regression] Many targets failing ssa-dom-cse-2.c after vectorizer changes law at redhat dot com
2020-05-25  7:36 ` [Bug middle-end/95309] " rguenth at gcc dot gnu.org
2020-05-25 11:13 ` rguenth at gcc dot gnu.org
2020-05-25 14:02 ` cvs-commit at gcc dot gnu.org
2020-05-25 14:02 ` rguenth 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).