public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
@ 2021-09-01  4:18 asolokha at gmx dot com
  2021-09-01  4:30 ` [Bug tree-optimization/102152] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2021-09-01  4:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102152
           Summary: [12 Regression] ICE: tree check: expected ssa_name,
                    have integer_cst in cprop_operand, at
                    tree-ssa-dom.c:1715
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: aarch64-linux-gnu

gcc-12.0.0-alpha20210829 snapshot (g:c3c669ac811429033c0151f910b38fc009e21ca8)
ICEs when compiling the following testcase w/ -march=armv8-a+sve -O1
-ftree-loop-vectorize -fno-tree-fre:

signed char i;

void
foo (void)
{
  for (i = 0; i < 6; i += 5)
    ;
}

% aarch64-linux-gnu-gcc-12.0.0 -march=armv8-a+sve -O1 -ftree-loop-vectorize
-fno-tree-fre -c gye5eeyb.c
during GIMPLE pass: dom
gye5eeyb.c: In function 'foo':
gye5eeyb.c:4:1: internal compiler error: tree check: expected ssa_name, have
integer_cst in cprop_operand, at tree-ssa-dom.c:1715
    4 | foo (void)
      | ^~~
0x7e6522 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/tree.c:8688
0x7a5747 tree_check(tree_node*, char const*, int, char const*, tree_code)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/tree.h:3391
0x7a5747 cprop_operand
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/tree-ssa-dom.c:1715
0x7a5747 cprop_into_stmt
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/tree-ssa-dom.c:1792
0x7a5747 dom_opt_dom_walker::optimize_stmt(basic_block_def*,
gimple_stmt_iterator*, bool*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/tree-ssa-dom.c:2002
0x105aef8 dom_opt_dom_walker::before_dom_children(basic_block_def*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/tree-ssa-dom.c:1430
0x1a17487 dom_walker::walk(basic_block_def*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/domwalk.c:309
0x10584ec execute
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20210829/work/gcc-12-20210829/gcc/tree-ssa-dom.c:764

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

* [Bug tree-optimization/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
  2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
@ 2021-09-01  4:30 ` pinskia at gcc dot gnu.org
  2021-09-01  4:35 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-01  4:30 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-09-01
   Target Milestone|---                         |12.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug tree-optimization/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
  2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
  2021-09-01  4:30 ` [Bug tree-optimization/102152] " pinskia at gcc dot gnu.org
@ 2021-09-01  4:35 ` pinskia at gcc dot gnu.org
  2021-09-01 10:10 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-01  4:35 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jeffreyalaw at gmail dot com

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(gdb) p debug_gimple_stmt(op_p.loc.stmt)
if (0 != 0)


Optimizing statement if (next_mask_61 != { 0, ... })
Reducing vector comparison: if (next_mask_61 != { 0, ... })
To scalar equivalent: if (0 != 0)


So r12-3190 caused it.

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

* [Bug tree-optimization/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
  2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
  2021-09-01  4:30 ` [Bug tree-optimization/102152] " pinskia at gcc dot gnu.org
  2021-09-01  4:35 ` pinskia at gcc dot gnu.org
@ 2021-09-01 10:10 ` rguenth at gcc dot gnu.org
  2021-09-01 20:31 ` law at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-01 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug tree-optimization/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
  2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-09-01 10:10 ` rguenth at gcc dot gnu.org
@ 2021-09-01 20:31 ` law at gcc dot gnu.org
  2021-09-01 23:15 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2021-09-01 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
We're just missing an update_stmt to ensure the operand cache is properly
updated.  Testing in progress.

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

* [Bug tree-optimization/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
  2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-09-01 20:31 ` law at gcc dot gnu.org
@ 2021-09-01 23:15 ` cvs-commit at gcc dot gnu.org
  2021-09-01 23:21 ` law at gcc dot gnu.org
  2021-09-02 19:56 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-01 23:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:165446a1e81f5bb9597289e783af9ee67e1fe5ba

commit r12-3304-g165446a1e81f5bb9597289e783af9ee67e1fe5ba
Author: Jeff Law <jlaw@localhost.localdomain>
Date:   Wed Sep 1 19:13:58 2021 -0400

    Call reduce_vector_comparison_to_scalar_comparison earlier

    As noted in the PR, we can get an ICE after the introduction of code to
reduce a vector comparison to a scalar.  The problem is we left the operand
cache in an inconsistent state because we called the new function too late.  
This is trivially fixed by making the transformation before we call
update_stmt_if_modified.

    The irony here is the whole point of calling
reduce_vector_comparison_to_scalar_comparison when we did was to expose these
kinds of secondary opportunities.  In this particular case we collapsed the
test to a comparison of constants (thus no SSA operands).

    Anyway, this fixes the problem in the obvious way.  This may all end up
being moot if I can twiddle Richi's match.pd pattern to work.  It doesn't work
as-written due to a couple issues that I haven't worked totally through yet.

    Installed on the trunk after bootstrap & regression testing on x86 and
verifying it addresses the aarch64 issue.

    gcc/
            PR tree-optimization/102152
            * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Reduce a
vector
            comparison to a scalar comparison before calling
            update_stmt_if_modified.

    gcc/testsuite/
            PR tree-optimization/102152
            * gcc.dg/pr102152.c: New test

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

* [Bug tree-optimization/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
  2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2021-09-01 23:15 ` cvs-commit at gcc dot gnu.org
@ 2021-09-01 23:21 ` law at gcc dot gnu.org
  2021-09-02 19:56 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2021-09-01 23:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Should be fixed on the trunk now.

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

* [Bug tree-optimization/102152] [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715
  2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2021-09-01 23:21 ` law at gcc dot gnu.org
@ 2021-09-02 19:56 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-02 19:56 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 102179 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2021-09-02 19:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01  4:18 [Bug tree-optimization/102152] New: [12 Regression] ICE: tree check: expected ssa_name, have integer_cst in cprop_operand, at tree-ssa-dom.c:1715 asolokha at gmx dot com
2021-09-01  4:30 ` [Bug tree-optimization/102152] " pinskia at gcc dot gnu.org
2021-09-01  4:35 ` pinskia at gcc dot gnu.org
2021-09-01 10:10 ` rguenth at gcc dot gnu.org
2021-09-01 20:31 ` law at gcc dot gnu.org
2021-09-01 23:15 ` cvs-commit at gcc dot gnu.org
2021-09-01 23:21 ` law at gcc dot gnu.org
2021-09-02 19:56 ` pinskia 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).