public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
@ 2021-06-02 20:59 zsojka at seznam dot cz
  2021-06-03  9:59 ` [Bug target/100887] " jakub at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: zsojka at seznam dot cz @ 2021-06-02 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100887
           Summary: [12 Regression] ICE: in
                    ix86_expand_vector_init_concat, at
                    config/i386/i386-expand.c:14178 with -mavx512f and
                    __builtin_shufflevector()
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 50913
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50913&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -mavx512f testcase.c 
during RTL pass: expand
testcase.c: In function 'foo':
testcase.c:6:3: internal compiler error: in ix86_expand_vector_init_concat, at
config/i386/i386-expand.c:14178
    6 |   __builtin_shufflevector (u, v, 0);
      |   ^~~~~~~~~~~~~~~~~~~~~~~
0x7ddb42 ix86_expand_vector_init_concat
        /repo/gcc-trunk/gcc/config/i386/i386-expand.c:14178
0x149cf87 ix86_expand_vector_init(bool, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/i386/i386-expand.c:14622
0x18c32ee ???
        /repo/gcc-trunk/gcc/config/i386/sse.md:22289
0xce0ba6 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        /repo/gcc-trunk/gcc/recog.h:407
0xce0ba6 store_constructor
        /repo/gcc-trunk/gcc/expr.c:7217
0xce2645 expand_constructor
        /repo/gcc-trunk/gcc/expr.c:8555
0xccea3a expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /repo/gcc-trunk/gcc/expr.c:10738
0xcdbe6c store_expr(tree_node*, rtx_def*, int, bool, bool)
        /repo/gcc-trunk/gcc/expr.c:5986
0xcdd62d expand_assignment(tree_node*, tree_node*, bool)
        /repo/gcc-trunk/gcc/expr.c:5721
0xb97ef1 expand_gimple_stmt_1
        /repo/gcc-trunk/gcc/cfgexpand.c:3916
0xb97ef1 expand_gimple_stmt
        /repo/gcc-trunk/gcc/cfgexpand.c:4014
0xb9e79b expand_gimple_basic_block
        /repo/gcc-trunk/gcc/cfgexpand.c:6056
0xba06c7 execute
        /repo/gcc-trunk/gcc/cfgexpand.c:6782
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-1164-20210602094549-g659cc7d6320-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-1164-20210602094549-g659cc7d6320-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210602 (experimental) (GCC)

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
@ 2021-06-03  9:59 ` jakub at gcc dot gnu.org
  2021-06-03 10:08 ` jakub at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-03  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-06-03
   Target Milestone|---                         |12.0
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|ICE: in                     |[12 Regression] ICE: in
                   |ix86_expand_vector_init_con |ix86_expand_vector_init_con
                   |cat, at                     |cat, at
                   |config/i386/i386-expand.c:1 |config/i386/i386-expand.c:1
                   |4178 with -mavx512f and     |4178 with -mavx512f and
                   |__builtin_shufflevector()   |__builtin_shufflevector()
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
ICEs since r12-1128-gef8176e0fac935c095cc39f4ecdfd43cdb8cb3f3

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
  2021-06-03  9:59 ` [Bug target/100887] " jakub at gcc dot gnu.org
@ 2021-06-03 10:08 ` jakub at gcc dot gnu.org
  2021-06-03 10:40 ` zsojka at seznam dot cz
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-03 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly adjusted so that it doesn't use uninitialized vars and does actually
return what is computed:
typedef unsigned __int128 U __attribute__((__vector_size__ (64)));
typedef unsigned __int128 V __attribute__((__vector_size__ (32)));
typedef unsigned __int128 W __attribute__((__vector_size__ (16)));

W
foo (U u, V v)
{
  return __builtin_shufflevector (u, v, 0);
}

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
  2021-06-03  9:59 ` [Bug target/100887] " jakub at gcc dot gnu.org
  2021-06-03 10:08 ` jakub at gcc dot gnu.org
@ 2021-06-03 10:40 ` zsojka at seznam dot cz
  2021-06-03 10:41 ` zsojka at seznam dot cz
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: zsojka at seznam dot cz @ 2021-06-03 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> ---
Probably related issue:

$ cat testcase.c
typedef unsigned long long __attribute__((__vector_size__ (16))) U;
typedef unsigned long long __attribute__((__vector_size__ (32))) V;
typedef unsigned long long __attribute__((__vector_size__ (64))) W;

U
foo (V v)
{
  return __builtin_shufflevector ((W){}, v, 0, 8);
}

$ x86_64-pc-linux-gnu-gcc -mavx512f testcase.c 
testcase.c: In function 'foo':
testcase.c:6:1: error: not allowed type combination in 'bit_insert_expr'
    6 | foo (V v)
      | ^~~
W
V
_2 = BIT_INSERT_EXPR <{ 0, 0, 0, 0, 0, 0, 0, 0 }, v, 64>;
testcase.c:6:1: internal compiler error: 'verify_gimple' failed
0x10b85ad verify_gimple_in_seq(gimple*)
        /repo/gcc-trunk/gcc/tree-cfg.c:5161
0xdaf5e6 gimplify_body(tree_node*, bool)
        /repo/gcc-trunk/gcc/gimplify.c:15404
0xdaf75d gimplify_function_tree(tree_node*)
        /repo/gcc-trunk/gcc/gimplify.c:15475
0xbd9127 cgraph_node::analyze()
        /repo/gcc-trunk/gcc/cgraphunit.c:670
0xbdbc57 analyze_functions
        /repo/gcc-trunk/gcc/cgraphunit.c:1234
0xbdc8ed symbol_table::finalize_compilation_unit()
        /repo/gcc-trunk/gcc/cgraphunit.c:2508
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] 17+ messages in thread

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2021-06-03 10:40 ` zsojka at seznam dot cz
@ 2021-06-03 10:41 ` zsojka at seznam dot cz
  2021-06-03 10:47 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: zsojka at seznam dot cz @ 2021-06-03 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Zdenek Sojka <zsojka at seznam dot cz> ---
(In reply to Jakub Jelinek from comment #1)
> ICEs since r12-1128-gef8176e0fac935c095cc39f4ecdfd43cdb8cb3f3

That is when __builtin_shufflevector() was introduced.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2021-06-03 10:41 ` zsojka at seznam dot cz
@ 2021-06-03 10:47 ` jakub at gcc dot gnu.org
  2021-06-03 10:48 ` zsojka at seznam dot cz
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-03 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50919
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50919&action=edit
gcc12-pr100887.patch

Untested fix.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2021-06-03 10:47 ` jakub at gcc dot gnu.org
@ 2021-06-03 10:48 ` zsojka at seznam dot cz
  2021-06-03 13:18 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: zsojka at seznam dot cz @ 2021-06-03 10:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Zdenek Sojka <zsojka at seznam dot cz> ---
(In reply to Jakub Jelinek from comment #5)
> Created attachment 50919 [details]
> gcc12-pr100887.patch
> 
> Untested fix.

Thank you for the patch. So the testcase from c#3 might be unrelated.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2021-06-03 10:48 ` zsojka at seznam dot cz
@ 2021-06-03 13:18 ` jakub at gcc dot gnu.org
  2021-06-04  9:20 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-03 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50921
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50921&action=edit
gcc12-pr100887-2.patch

Untested fix for the #c3 ICE.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2021-06-03 13:18 ` jakub at gcc dot gnu.org
@ 2021-06-04  9:20 ` cvs-commit at gcc dot gnu.org
  2021-06-07  7:29 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-04  9:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

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

commit r12-1205-gb7dd2e4eeb44bc8678ecde8a6c7401de85e63561
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jun 4 11:20:02 2021 +0200

    x86: Fix ix86_expand_vector_init for V*TImode [PR100887]

    We have vec_initv4tiv2ti and vec_initv2titi patterns which call
    ix86_expand_vector_init and assume it works for those modes.  For the
    case of construction from two half-sized vectors, the code assumes it
    will always succeed, but we have only insn patterns with SImode and DImode
    element types.  QImode and HImode element types are already handled
    by performing it with same sized vectors with SImode elements and the
    following patch extends that to V*TImode vectors.

    2021-06-04  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            * config/i386/i386-expand.c (ix86_expand_vector_init): Handle
            concatenation from half-sized modes with TImode elements.

            * gcc.target/i386/pr100887.c: New test.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2021-06-04  9:20 ` cvs-commit at gcc dot gnu.org
@ 2021-06-07  7:29 ` cvs-commit at gcc dot gnu.org
  2021-06-07  7:37 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-07  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

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

commit r12-1256-ge1521b170b44be5cd5d36a98b6b760457b68f566
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jun 7 09:28:31 2021 +0200

    fold-const: Fix up fold_read_from_vector [PR100887]

    The callers of fold_read_from_vector expect that the index they pass is
    an index of an element in the vector and the function does that most of the
    time.  But we allow CONSTRUCTORs with VECTOR_TYPE to have VECTOR_TYPE
    elements and in that case every CONSTRUCTOR element represents not just one
    index (with the exception of V1 vectors), but multiple.
    So returning zero vector if i >= CONSTRUCTOR_NELTS or returning some
    CONSTRUCTOR_ELT's value might not be what the callers expect.

    Fixed by punting if the first element has vector type.
    Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

    In theory we could instead recurse (and assert that for CONSTRUCTORs of
    vector elements we have always all elements specified like tree-cfg.c
    verifies?) after adjusting the index appropriately.

    2021-06-07  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            * fold-const.c (fold_read_from_vector): Return NULL if trying to
            read from a CONSTRUCTOR with vector type elements.

            * gcc.dg/pr100887.c: New test.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2021-06-07  7:29 ` cvs-commit at gcc dot gnu.org
@ 2021-06-07  7:37 ` jakub at gcc dot gnu.org
  2021-06-08  8:07 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-07  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed now.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  2021-06-07  7:37 ` jakub at gcc dot gnu.org
@ 2021-06-08  8:07 ` cvs-commit at gcc dot gnu.org
  2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-08  8:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

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

commit r12-1279-gec2174c6957e97bd69c001a782cd52b98e6ba2fb
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Jun 8 10:06:13 2021 +0200

    testsuite: Add -Wno-psabi -w to pr100887.c test [PR100943]

    On x86 the test is using -mavx512f and so never reports the various
    -Wpsabi notes/warnings, but on other targets it can.

    2021-06-08  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            PR testsuite/100943
            * gcc.dg/pr100887.c: Add -Wno-psabi -w to dg-options.

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (10 preceding siblings ...)
  2021-06-08  8:07 ` cvs-commit at gcc dot gnu.org
@ 2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
  2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-17  5:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1c1ee19e7023e18ba63324e06ae9387bde227357

commit r11-8587-g1c1ee19e7023e18ba63324e06ae9387bde227357
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jun 4 11:20:02 2021 +0200

    x86: Fix ix86_expand_vector_init for V*TImode [PR100887]

    We have vec_initv4tiv2ti and vec_initv2titi patterns which call
    ix86_expand_vector_init and assume it works for those modes.  For the
    case of construction from two half-sized vectors, the code assumes it
    will always succeed, but we have only insn patterns with SImode and DImode
    element types.  QImode and HImode element types are already handled
    by performing it with same sized vectors with SImode elements and the
    following patch extends that to V*TImode vectors.

    2021-06-04  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            * config/i386/i386-expand.c (ix86_expand_vector_init): Handle
            concatenation from half-sized modes with TImode elements.

    (cherry picked from commit b7dd2e4eeb44bc8678ecde8a6c7401de85e63561)

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (11 preceding siblings ...)
  2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
@ 2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
  2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-17  5:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

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

commit r11-8590-gce1dd5e70514fde8e34c86ab45a3c55e84d3c5b7
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jun 7 09:28:31 2021 +0200

    fold-const: Fix up fold_read_from_vector [PR100887]

    The callers of fold_read_from_vector expect that the index they pass is
    an index of an element in the vector and the function does that most of the
    time.  But we allow CONSTRUCTORs with VECTOR_TYPE to have VECTOR_TYPE
    elements and in that case every CONSTRUCTOR element represents not just one
    index (with the exception of V1 vectors), but multiple.
    So returning zero vector if i >= CONSTRUCTOR_NELTS or returning some
    CONSTRUCTOR_ELT's value might not be what the callers expect.

    Fixed by punting if the first element has vector type.
    Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

    In theory we could instead recurse (and assert that for CONSTRUCTORs of
    vector elements we have always all elements specified like tree-cfg.c
    verifies?) after adjusting the index appropriately.

    2021-06-07  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            * fold-const.c (fold_read_from_vector): Return NULL if trying to
            read from a CONSTRUCTOR with vector type elements.

    (cherry picked from commit e1521b170b44be5cd5d36a98b6b760457b68f566)

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (12 preceding siblings ...)
  2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
@ 2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
  2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
  2022-05-11  6:20 ` cvs-commit at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:2f5857a3ad1160a467c4c351820a450a7cff2d50

commit r10-10615-g2f5857a3ad1160a467c4c351820a450a7cff2d50
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jun 4 11:20:02 2021 +0200

    x86: Fix ix86_expand_vector_init for V*TImode [PR100887]

    We have vec_initv4tiv2ti and vec_initv2titi patterns which call
    ix86_expand_vector_init and assume it works for those modes.  For the
    case of construction from two half-sized vectors, the code assumes it
    will always succeed, but we have only insn patterns with SImode and DImode
    element types.  QImode and HImode element types are already handled
    by performing it with same sized vectors with SImode elements and the
    following patch extends that to V*TImode vectors.

    2021-06-04  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            * config/i386/i386-expand.c (ix86_expand_vector_init): Handle
            concatenation from half-sized modes with TImode elements.

    (cherry picked from commit b7dd2e4eeb44bc8678ecde8a6c7401de85e63561)

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (13 preceding siblings ...)
  2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
@ 2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
  2022-05-11  6:20 ` cvs-commit at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:74b7d769e3cc1b18509103a6ac6466713858a376

commit r10-10617-g74b7d769e3cc1b18509103a6ac6466713858a376
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jun 7 09:28:31 2021 +0200

    fold-const: Fix up fold_read_from_vector [PR100887]

    The callers of fold_read_from_vector expect that the index they pass is
    an index of an element in the vector and the function does that most of the
    time.  But we allow CONSTRUCTORs with VECTOR_TYPE to have VECTOR_TYPE
    elements and in that case every CONSTRUCTOR element represents not just one
    index (with the exception of V1 vectors), but multiple.
    So returning zero vector if i >= CONSTRUCTOR_NELTS or returning some
    CONSTRUCTOR_ELT's value might not be what the callers expect.

    Fixed by punting if the first element has vector type.
    Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

    In theory we could instead recurse (and assert that for CONSTRUCTORs of
    vector elements we have always all elements specified like tree-cfg.c
    verifies?) after adjusting the index appropriately.

    2021-06-07  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            * fold-const.c (fold_read_from_vector): Return NULL if trying to
            read from a CONSTRUCTOR with vector type elements.

    (cherry picked from commit e1521b170b44be5cd5d36a98b6b760457b68f566)

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

* [Bug target/100887] [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector()
  2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
                   ` (14 preceding siblings ...)
  2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11  6:20 ` cvs-commit at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-11  6:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

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

commit r9-10074-ge7e1ad94007d79b5bae948a03b6c6b57243708bc
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jun 4 11:20:02 2021 +0200

    x86: Fix ix86_expand_vector_init for V*TImode [PR100887]

    We have vec_initv4tiv2ti and vec_initv2titi patterns which call
    ix86_expand_vector_init and assume it works for those modes.  For the
    case of construction from two half-sized vectors, the code assumes it
    will always succeed, but we have only insn patterns with SImode and DImode
    element types.  QImode and HImode element types are already handled
    by performing it with same sized vectors with SImode elements and the
    following patch extends that to V*TImode vectors.

    2021-06-04  Jakub Jelinek  <jakub@redhat.com>

            PR target/100887
            * config/i386/i386.c (ix86_expand_vector_init): Handle
            concatenation from half-sized modes with TImode elements.

    (cherry picked from commit b7dd2e4eeb44bc8678ecde8a6c7401de85e63561)

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

end of thread, other threads:[~2022-05-11  6:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 20:59 [Bug target/100887] New: [12 Regression] ICE: in ix86_expand_vector_init_concat, at config/i386/i386-expand.c:14178 with -mavx512f and __builtin_shufflevector() zsojka at seznam dot cz
2021-06-03  9:59 ` [Bug target/100887] " jakub at gcc dot gnu.org
2021-06-03 10:08 ` jakub at gcc dot gnu.org
2021-06-03 10:40 ` zsojka at seznam dot cz
2021-06-03 10:41 ` zsojka at seznam dot cz
2021-06-03 10:47 ` jakub at gcc dot gnu.org
2021-06-03 10:48 ` zsojka at seznam dot cz
2021-06-03 13:18 ` jakub at gcc dot gnu.org
2021-06-04  9:20 ` cvs-commit at gcc dot gnu.org
2021-06-07  7:29 ` cvs-commit at gcc dot gnu.org
2021-06-07  7:37 ` jakub at gcc dot gnu.org
2021-06-08  8:07 ` cvs-commit at gcc dot gnu.org
2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:20 ` cvs-commit 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).