public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
@ 2020-11-16 12:48 acoplan at gcc dot gnu.org
  2020-11-16 12:49 ` [Bug tree-optimization/97849] [10/11 Regression] " acoplan at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-16 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97849
           Summary: aarch64: ICE (segfault) during GIMPLE pass: ifcvt
                    since r10-3543-gf30b3d28
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

AArch64 GCC ICEs on the following testcase:

int a, b, c, d;
static int e(int f) { return a == 0 ? 0 : f / a; }
int g() {
  int h;
  char i = c = 0;
  for (; c <= 8; c++)
    --i;
  for (; b;) {
    int *j = &a;
    d = *j;
    *j = e(0 >= i);
  }
}

at -O1 -ftree-vectorize -march=armv8.2-a+sve since
r10-3543-gf30b3d2891cef9803badb3f85d739c0fcfafd585. To reproduce:

$ aarch64-elf-gcc -c -S -O1 -ftree-vectorize -march=armv8.2-a+sve test.c

during GIMPLE pass: ifcvt
test.c: In function 'g':
test.c:3:5: internal compiler error: Segmentation fault
    3 | int g() {
      |     ^
0xdb190b crash_signal
        /home/alecop01/toolchain/src/gcc/gcc/toplev.c:330
0xe48224 ifcvt_local_dce
        /home/alecop01/toolchain/src/gcc/gcc/tree-if-conv.c:2993
0xe48224 tree_if_conversion(loop*, vec<gimple*, va_heap, vl_ptr>*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-if-conv.c:3130
0xe48ace execute
        /home/alecop01/toolchain/src/gcc/gcc/tree-if-conv.c:3207
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug tree-optimization/97849] [10/11 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
@ 2020-11-16 12:49 ` acoplan at gcc dot gnu.org
  2020-11-17  5:00 ` prathamesh3492 at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-16 12:49 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.0
           Keywords|                            |ice-on-valid-code
             Target|                            |aarch64
   Target Milestone|---                         |10.3
            Summary|aarch64: ICE (segfault)     |[10/11 Regression] aarch64:
                   |during GIMPLE pass: ifcvt   |ICE (segfault) during
                   |since r10-3543-gf30b3d28    |GIMPLE pass: ifcvt since
                   |                            |r10-3543-gf30b3d28

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

* [Bug tree-optimization/97849] [10/11 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
  2020-11-16 12:49 ` [Bug tree-optimization/97849] [10/11 Regression] " acoplan at gcc dot gnu.org
@ 2020-11-17  5:00 ` prathamesh3492 at gcc dot gnu.org
  2020-11-17  7:00 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: prathamesh3492 at gcc dot gnu.org @ 2020-11-17  5:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from prathamesh3492 at gcc dot gnu.org ---
Hi,
Sorry for the breakage, will take a look.

Regards,
Prathamesh

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

* [Bug tree-optimization/97849] [10/11 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
  2020-11-16 12:49 ` [Bug tree-optimization/97849] [10/11 Regression] " acoplan at gcc dot gnu.org
  2020-11-17  5:00 ` prathamesh3492 at gcc dot gnu.org
@ 2020-11-17  7:00 ` rguenth at gcc dot gnu.org
  2020-11-17  7:00 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-17  7:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug tree-optimization/97849] [10/11 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-11-17  7:00 ` rguenth at gcc dot gnu.org
@ 2020-11-17  7:00 ` rguenth at gcc dot gnu.org
  2020-11-24  1:29 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-17  7:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-11-17
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

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

* [Bug tree-optimization/97849] [10/11 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-11-17  7:00 ` rguenth at gcc dot gnu.org
@ 2020-11-24  1:29 ` cvs-commit at gcc dot gnu.org
  2020-11-24  1:35 ` prathamesh3492 at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-24  1:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:5700973f4a30762b4fc21687bb5f7843e55da2e4

commit r11-5268-g5700973f4a30762b4fc21687bb5f7843e55da2e4
Author: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Date:   Tue Nov 24 06:50:53 2020 +0530

    tree-opt: Fix segfault in tree-if-conv.c with -march=armv8.2-a+sve
[PR97849]

    The issue here is that rpo vn may eliminate target ssa_name referred to in
    redundant_ssa_names, and thus ifcvt_local_dce may replace candidate
    ssa_name with invalid ssa_name resulting in incorrect IR. The patch simply
    does ssa_name replacement before calling do_rpo_vn, which fixes the issue.

    gcc/
    2020-11-24  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

            PR tree-optimization/97849
            * tree-if-conv.c (tree_if_conversion): Move ssa_name
            replacement code from ifcvt_local_dce to this function
            before calling do_rpo_vn.

    gcc/testsuite/
    2020-11-24  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

            PR tree-optimization/97849
            * gcc.dg/tree-ssa/pr97849.c: New test.

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

* [Bug tree-optimization/97849] [10/11 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-11-24  1:29 ` cvs-commit at gcc dot gnu.org
@ 2020-11-24  1:35 ` prathamesh3492 at gcc dot gnu.org
  2021-03-31 13:49 ` [Bug tree-optimization/97849] [10 " cvs-commit at gcc dot gnu.org
  2021-03-31 13:51 ` acoplan at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: prathamesh3492 at gcc dot gnu.org @ 2020-11-24  1:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from prathamesh3492 at gcc dot gnu.org ---
Fixed on trunk.

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

* [Bug tree-optimization/97849] [10 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-11-24  1:35 ` prathamesh3492 at gcc dot gnu.org
@ 2021-03-31 13:49 ` cvs-commit at gcc dot gnu.org
  2021-03-31 13:51 ` acoplan at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-31 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:

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

commit r10-9642-gad8c55c1df32839cf74704b68a072772b14bd1e2
Author: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Date:   Tue Nov 24 06:50:53 2020 +0530

    tree-opt: Fix segfault in tree-if-conv.c with -march=armv8.2-a+sve
[PR97849]

    The issue here is that rpo vn may eliminate target ssa_name referred to in
    redundant_ssa_names, and thus ifcvt_local_dce may replace candidate
    ssa_name with invalid ssa_name resulting in incorrect IR. The patch simply
    does ssa_name replacement before calling do_rpo_vn, which fixes the issue.

    gcc/
    2020-11-24  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

            PR tree-optimization/97849
            * tree-if-conv.c (tree_if_conversion): Move ssa_name
            replacement code from ifcvt_local_dce to this function
            before calling do_rpo_vn.

    gcc/testsuite/
    2020-11-24  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

            PR tree-optimization/97849
            * gcc.dg/tree-ssa/pr97849.c: New test.

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

* [Bug tree-optimization/97849] [10 Regression] aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28
  2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-03-31 13:49 ` [Bug tree-optimization/97849] [10 " cvs-commit at gcc dot gnu.org
@ 2021-03-31 13:51 ` acoplan at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-31 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

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

--- Comment #5 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Fixed for GCC 10.3.

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

end of thread, other threads:[~2021-03-31 13:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 12:48 [Bug tree-optimization/97849] New: aarch64: ICE (segfault) during GIMPLE pass: ifcvt since r10-3543-gf30b3d28 acoplan at gcc dot gnu.org
2020-11-16 12:49 ` [Bug tree-optimization/97849] [10/11 Regression] " acoplan at gcc dot gnu.org
2020-11-17  5:00 ` prathamesh3492 at gcc dot gnu.org
2020-11-17  7:00 ` rguenth at gcc dot gnu.org
2020-11-17  7:00 ` rguenth at gcc dot gnu.org
2020-11-24  1:29 ` cvs-commit at gcc dot gnu.org
2020-11-24  1:35 ` prathamesh3492 at gcc dot gnu.org
2021-03-31 13:49 ` [Bug tree-optimization/97849] [10 " cvs-commit at gcc dot gnu.org
2021-03-31 13:51 ` acoplan 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).