public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512
@ 2020-05-24 21:05 vsevolod.livinskij at frtk dot ru
  2020-05-24 21:08 ` [Bug tree-optimization/95308] " vsevolod.livinskij at frtk dot ru
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vsevolod.livinskij at frtk dot ru @ 2020-05-24 21:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95308
           Summary: ICE: in maybe_canonicalize_mem_ref_addr with -O3
                    -march=skylake-avx512
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vsevolod.livinskij at frtk dot ru
  Target Milestone: ---

Error:
>$ g++ -O3 -march=skylake-avx512 -c func.cpp
during GIMPLE pass: forwprop
func.cpp: In function ‘void i(char, long int (*)[100][100][100])’:
func.cpp:5:6: internal compiler error: in maybe_canonicalize_mem_ref_addr, at
gimple-fold.c:4912
    5 | void i(char f, long g[][100][100][100]) {
      |      ^
0x76db2a maybe_canonicalize_mem_ref_addr
        gcc_src/gcc/gimple-fold.c:4912
0xdfdd97 fold_stmt_1
        gcc_src/gcc/gimple-fold.c:5014
0x1226b41 execute
        gcc_src/gcc/tree-ssa-forwprop.c:3095

Reproducer:
extern int a[][18];
extern short b[], c[];
extern char d[][18];
int e;
void i(char f, long g[][100][100][100]) {
  for (int h = 0;; h += 2)
    for (char j = 0; j < 17; j++) {
      if (e ? f : 0) {
        a[h][j] = 5;
        for (int k = 0; k < 12; k += 4)
          for (short l = 0; l < 015; l += 2)
            b[k * 3 + l] = bool(g[2][j][k][l]);
      } else
        d[h][j] = 0;
      c[j] = 3;
    }
}

GCC version:
11.0.0 (a57aa11191617754c8d43b3eb6a2576e970a0668)

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

* [Bug tree-optimization/95308] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
@ 2020-05-24 21:08 ` vsevolod.livinskij at frtk dot ru
  2020-05-25  7:36 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: vsevolod.livinskij at frtk dot ru @ 2020-05-24 21:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Vsevolod Livinskiy <vsevolod.livinskij at frtk dot ru> ---
bug 94216 might be related to this one

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

* [Bug tree-optimization/95308] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
  2020-05-24 21:08 ` [Bug tree-optimization/95308] " vsevolod.livinskij at frtk dot ru
@ 2020-05-25  7:36 ` rguenth at gcc dot gnu.org
  2020-05-25  8:50 ` [Bug tree-optimization/95308] [10/11 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ 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=95308

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-05-25
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug_generic_expr (addr)
&MEM[symbol: a, index: ivtmp.36_228, step: 4, offset: 0B]

so we're propagating the address of a TMR.  In this case we have an
outer MEM_REF with zero offset so we can canonicalize this to sth valid.
Want to check where this comes from though.

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

* [Bug tree-optimization/95308] [10/11 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
  2020-05-24 21:08 ` [Bug tree-optimization/95308] " vsevolod.livinskij at frtk dot ru
  2020-05-25  7:36 ` rguenth at gcc dot gnu.org
@ 2020-05-25  8:50 ` marxin at gcc dot gnu.org
  2020-05-25 10:38 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-25  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.1.0, 11.0
            Summary|ICE: in                     |[10/11 Regression] ICE: in
                   |maybe_canonicalize_mem_ref_ |maybe_canonicalize_mem_ref_
                   |addr with -O3               |addr with -O3
                   |-march=skylake-avx512       |-march=skylake-avx512 since
                   |                            |r10-4203-g97c146036750e7cb
                 CC|                            |avieira at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
      Known to work|                            |9.3.0

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Using --param=vect-epilogues-nomask=1 it started with
r10-4203-g97c146036750e7cb.

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

* [Bug tree-optimization/95308] [10/11 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
                   ` (2 preceding siblings ...)
  2020-05-25  8:50 ` [Bug tree-optimization/95308] [10/11 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb marxin at gcc dot gnu.org
@ 2020-05-25 10:38 ` cvs-commit at gcc dot gnu.org
  2020-05-25 10:38 ` [Bug tree-optimization/95308] [10 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-25 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:a0c623f58198d3c8f767a181574537720386b468

commit r11-606-ga0c623f58198d3c8f767a181574537720386b468
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 25 09:44:50 2020 +0200

    tree-optimization/95308 - really avoid forward propagating of &TMR

    This fixes a hole that still allowed forwarding of TARGET_MEM_REF
    addresses.

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

            PR tree-optimization/95308
            * tree-ssa-forwprop.c (pass_forwprop::execute): Generalize
            test for TARGET_MEM_REFs.

            * g++.dg/torture/pr95308.C: New testcase.

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

* [Bug tree-optimization/95308] [10 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
                   ` (3 preceding siblings ...)
  2020-05-25 10:38 ` cvs-commit at gcc dot gnu.org
@ 2020-05-25 10:38 ` rguenth at gcc dot gnu.org
  2020-05-25 11:46 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-25 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.0
      Known to fail|11.0                        |
           Priority|P3                          |P2
            Summary|[10/11 Regression] ICE: in  |[10 Regression] ICE: in
                   |maybe_canonicalize_mem_ref_ |maybe_canonicalize_mem_ref_
                   |addr with -O3               |addr with -O3
                   |-march=skylake-avx512 since |-march=skylake-avx512 since
                   |r10-4203-g97c146036750e7cb  |r10-4203-g97c146036750e7cb
   Target Milestone|---                         |10.2

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.

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

* [Bug tree-optimization/95308] [10 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
                   ` (4 preceding siblings ...)
  2020-05-25 10:38 ` [Bug tree-optimization/95308] [10 " rguenth at gcc dot gnu.org
@ 2020-05-25 11:46 ` cvs-commit at gcc dot gnu.org
  2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
  2020-06-23 11:09 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-25 11:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 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:67bfbda18f4e6d0d30ad8f8790f1d0d4653131ed

commit r11-610-g67bfbda18f4e6d0d30ad8f8790f1d0d4653131ed
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 25 13:48:57 2020 +0200

    tree-optimization/95308 - really avoid forward propagating of &TMR

    This fixes a hole that still allowed forwarding of TARGET_MEM_REF
    addresses.

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

            PR tree-optimization/95308
            * tree-ssa-forwprop.c (pass_forwprop::execute): Generalize
            test for TARGET_MEM_REFs.

            * g++.dg/torture/pr95308.C: New testcase.

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

* [Bug tree-optimization/95308] [10 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
                   ` (5 preceding siblings ...)
  2020-05-25 11:46 ` cvs-commit at gcc dot gnu.org
@ 2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
  2020-06-23 11:09 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-23 11:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:7e64ef0dfde9482d6004a406dd64bb7da109122f

commit r10-8352-g7e64ef0dfde9482d6004a406dd64bb7da109122f
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 25 09:44:50 2020 +0200

    tree-optimization/95308 - really avoid forward propagating of &TMR

    This fixes a hole that still allowed forwarding of TARGET_MEM_REF
    addresses.

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

            PR tree-optimization/95308
            * tree-ssa-forwprop.c (pass_forwprop::execute): Generalize
            test for TARGET_MEM_REFs.

            * g++.dg/torture/pr95308.C: New testcase.

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

* [Bug tree-optimization/95308] [10 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb
  2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
                   ` (6 preceding siblings ...)
  2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
@ 2020-06-23 11:09 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-23 11:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.1.1
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-06-23 11:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24 21:05 [Bug tree-optimization/95308] New: ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 vsevolod.livinskij at frtk dot ru
2020-05-24 21:08 ` [Bug tree-optimization/95308] " vsevolod.livinskij at frtk dot ru
2020-05-25  7:36 ` rguenth at gcc dot gnu.org
2020-05-25  8:50 ` [Bug tree-optimization/95308] [10/11 Regression] ICE: in maybe_canonicalize_mem_ref_addr with -O3 -march=skylake-avx512 since r10-4203-g97c146036750e7cb marxin at gcc dot gnu.org
2020-05-25 10:38 ` cvs-commit at gcc dot gnu.org
2020-05-25 10:38 ` [Bug tree-optimization/95308] [10 " rguenth at gcc dot gnu.org
2020-05-25 11:46 ` cvs-commit at gcc dot gnu.org
2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
2020-06-23 11:09 ` 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).