public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower
@ 2021-05-11 21:23 cnsun at uwaterloo dot ca
  2021-05-12  9:38 ` [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2 marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-05-11 21:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100549
           Summary: ICE: Segmentation fault, gsi_insert_seq_nodes_before,
                    during GIMPLE pass: lower
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.FUbEknNORK-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210511 (experimental) [master revision
:7db32cac8:aa891c56f25baac94db004e309d1b6e40b770a95] (GCC)

$ cat mutant.c
typedef short v8hi __attribute__((vector_size(16)));
f6(v8hi a) { __builtin_ia32_pcmpgtw128(a, a); }

$ gcc-trunk -O0 mutant.c
mutant.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | f6(v8hi a) { __builtin_ia32_pcmpgtw128(a, a); }
      | ^~
during GIMPLE pass: lower
mutant.c: In function ‘f6’:
mutant.c:2:1: internal compiler error: Segmentation fault
0xef7273 crash_signal
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/toplev.c:327
0xbebb17 gsi_insert_seq_nodes_before
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-iterator.c:130
0x12a30c6 ix86_gimple_fold_builtin(gimple_stmt_iterator*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/config/i386/i386.c:18003
0xc01508 gimple_fold_call
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-fold.c:5586
0xc0288b fold_stmt_1
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-fold.c:6283
0x19177c3 lower_stmt
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:388
0x19177c3 lower_sequence
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:217
0x191766d lower_gimple_bind
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:473
0x191852d lower_function_body
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:110
0x191852d execute
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:195
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] 7+ messages in thread

* [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2
  2021-05-11 21:23 [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower cnsun at uwaterloo dot ca
@ 2021-05-12  9:38 ` marxin at gcc dot gnu.org
  2021-05-13  0:59 ` crazylht at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-05-12  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-05-12
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |hjl.tools at gmail dot com,
                   |                            |marxin at gcc dot gnu.org
            Summary|ICE: Segmentation fault     |[12 Regression] ICE:
                   |with                        |Segmentation fault with
                   |__builtin_ia32_pcmpgtw128   |__builtin_ia32_pcmpgtw128
                   |                            |since
                   |                            |r12-110-gc54a9f7259fce1a2

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-110-gc54a9f7259fce1a2.

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

* [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2
  2021-05-11 21:23 [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower cnsun at uwaterloo dot ca
  2021-05-12  9:38 ` [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2 marxin at gcc dot gnu.org
@ 2021-05-13  0:59 ` crazylht at gmail dot com
  2021-05-13  1:56 ` crazylht at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2021-05-13  0:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Martin Liška from comment #1)
> Started with r12-110-gc54a9f7259fce1a2.

Mine.

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

* [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2
  2021-05-11 21:23 [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower cnsun at uwaterloo dot ca
  2021-05-12  9:38 ` [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2 marxin at gcc dot gnu.org
  2021-05-13  0:59 ` crazylht at gmail dot com
@ 2021-05-13  1:56 ` crazylht at gmail dot com
  2021-05-17 12:04 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2021-05-13  1:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
when args0 and args1 is the same, gimple_build (&stmts, GT_EXPR, cmp_type,
args0, args1) will just return 0 w/o set stmts, which cause ICE in
gsi_insert_before (gsi, *NULL*, GSI_SAME_STMT);

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

* [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2
  2021-05-11 21:23 [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower cnsun at uwaterloo dot ca
                   ` (2 preceding siblings ...)
  2021-05-13  1:56 ` crazylht at gmail dot com
@ 2021-05-17 12:04 ` cvs-commit at gcc dot gnu.org
  2021-05-17 15:13 ` rguenth at gcc dot gnu.org
  2021-05-17 15:13 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-17 12:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:45063c0506a00f2673049d46f12a6061dca4692f

commit r12-833-g45063c0506a00f2673049d46f12a6061dca4692f
Author: liuhongt <hongtao.liu@intel.com>
Date:   Thu May 13 13:08:16 2021 +0800

    Fix ICE [PR target/100549]

    When arg0 is same as arg1 in __builtin_ia32_pcmpgtw,
    gimple_build (&stmts, GT_EXPR, cmp_type, arg0, arg1) will simplify the
    comparison to vector constant 0, no stmts is generated, which causes
    ICE in gsi_insert_before (gsi, stmts, GSI_SAME_STMT). So use
    gsi_insert_seq_before instead which will handle NULL seq.

    gcc/ChangeLog:

            PR target/100549
            * config/i386/i386.c (ix86_gimple_fold_builtin): Use
            gsi_insert_seq_before instead.

    gcc/testsuite/ChangeLog:

            PR target/100549
            * gcc.target/i386/pr100549.c: New test.

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

* [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2
  2021-05-11 21:23 [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower cnsun at uwaterloo dot ca
                   ` (3 preceding siblings ...)
  2021-05-17 12:04 ` cvs-commit at gcc dot gnu.org
@ 2021-05-17 15:13 ` rguenth at gcc dot gnu.org
  2021-05-17 15:13 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-17 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2
  2021-05-11 21:23 [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower cnsun at uwaterloo dot ca
                   ` (4 preceding siblings ...)
  2021-05-17 15:13 ` rguenth at gcc dot gnu.org
@ 2021-05-17 15:13 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-17 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2021-05-17 15:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 21:23 [Bug c/100549] New: ICE: Segmentation fault, gsi_insert_seq_nodes_before, during GIMPLE pass: lower cnsun at uwaterloo dot ca
2021-05-12  9:38 ` [Bug target/100549] [12 Regression] ICE: Segmentation fault with __builtin_ia32_pcmpgtw128 since r12-110-gc54a9f7259fce1a2 marxin at gcc dot gnu.org
2021-05-13  0:59 ` crazylht at gmail dot com
2021-05-13  1:56 ` crazylht at gmail dot com
2021-05-17 12:04 ` cvs-commit at gcc dot gnu.org
2021-05-17 15:13 ` rguenth at gcc dot gnu.org
2021-05-17 15:13 ` 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).