[go: nahoru, domu]

Bug 115867 - [14 Regression] ICE: tree check: expected vector_type, have integer_type in TYPE_VECTOR_SUBPARTS, at tree.h:4246
Summary: [14 Regression] ICE: tree check: expected vector_type, have integer_type in T...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 14.1.1
: P2 normal
Target Milestone: 14.2
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: vectorizer
  Show dependency treegraph
 
Reported: 2024-07-11 06:55 UTC by Richard Biener
Modified: 2024-07-16 14:23 UTC (History)
0 users

See Also:
Host:
Target: x86_64-*-*
Build:
Known to work: 13.3.1, 14.1.1, 15.0
Known to fail: 14.1.0
Last reconfirmed: 2024-07-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2024-07-11 06:55:25 UTC
The gcc.dg/vect/vect-simd-clone-20.c testcase ICEs when built with -march=znver4
or -mavx512vl

> /spc/abuild/rguenther/gcc14-g/gcc/xgcc -B/spc/abuild/rguenther/gcc14-g/gcc/ /space/rguenther/src/gcc-14-branch/gcc/testsuite/gcc.dg/vect/vect-simd-clone-20.c -mavx512vl --param=vect-partial-vector-usage=0 -fdiagnostics-plain-output -msse2 -ftree-vectorize -fno-tree-loop-distribute-patterns -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details -fopenmp-simd --param vect-epilogues-nomask=0 -mavx -lm -o ./vect-simd-clone-20.exe
during GIMPLE pass: vect
dump file: ./vect-simd-clone-20.c.179t.vect
/space/rguenther/src/gcc-14-branch/gcc/testsuite/gcc.dg/vect/vect-simd-clone-20.c: In function ‘masked’:
/space/rguenther/src/gcc-14-branch/gcc/testsuite/gcc.dg/vect/vect-simd-clone-20.c:22:1: internal compiler error: tree check: expected vector_type, have integer_type in TYPE_VECTOR_SUBPARTS, at tree.h:4246
0x1b2529a tree_check_failed(tree_node const*, char const*, int, char const*, ...)
        /space/rguenther/src/gcc-14-branch/gcc/tree.cc:8995
0xd3d83b tree_check(tree_node const*, char const*, int, char const*, tree_code)
        /space/rguenther/src/gcc-14-branch/gcc/tree.h:3912
0xdcd087 TYPE_VECTOR_SUBPARTS(tree_node const*)
        /space/rguenther/src/gcc-14-branch/gcc/tree.h:4246
0x305d200 vectorizable_simd_clone_call
        /space/rguenther/src/gcc-14-branch/gcc/tree-vect-stmts.cc:4719
0x307f49d vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /space/rguenther/src/gcc-14-branch/gcc/tree-vect-stmts.cc:13445
0x1a9c6ba vect_transform_loop_stmt
        /space/rguenther/src/gcc-14-branch/gcc/tree-vect-loop.cc:11566
Comment 1 Richard Biener 2024-07-11 08:08:36 UTC
This is also in-branch call support.  When we build the mask argument
for an unconditional branch we have to properly deal with integer mode masks.
Comment 2 GCC Commits 2024-07-12 05:42:20 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:4f4478f0f31263997bfdc4159f90e58dd79b38f9

commit r15-1990-g4f4478f0f31263997bfdc4159f90e58dd79b38f9
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jul 11 10:18:55 2024 +0200

    tree-optimization/115867 - ICE with simdcall vectorization in masked loop
    
    When only a loop mask is to be supplied for the inbranch arg to a
    simd function we fail to handle integer mode masks correctly.  We
    need to guess the number of elements represented by it.  This assumes
    that excess arguments are all for masks, I wasn't able to create
    a simdclone with more than one integer mode mask argument.
    
    The gcc.dg/vect/vect-simd-clone-20.c exercises this with -mavx512vl
    
            PR tree-optimization/115867
            * tree-vect-stmts.cc (vectorizable_simd_clone_call): Properly
            guess the number of mask elements for integer mode masks.
Comment 3 GCC Commits 2024-07-16 14:23:16 UTC
The releases/gcc-14 branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r14-10436-gca275b68ef11d7d70bff8d7426e45b37366664b3
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jul 11 10:18:55 2024 +0200

    tree-optimization/115867 - ICE with simdcall vectorization in masked loop
    
    When only a loop mask is to be supplied for the inbranch arg to a
    simd function we fail to handle integer mode masks correctly.  We
    need to guess the number of elements represented by it.  This assumes
    that excess arguments are all for masks, I wasn't able to create
    a simdclone with more than one integer mode mask argument.
    
    The gcc.dg/vect/vect-simd-clone-20.c exercises this with -mavx512vl
    
            PR tree-optimization/115867
            * tree-vect-stmts.cc (vectorizable_simd_clone_call): Properly
            guess the number of mask elements for integer mode masks.
    
    (cherry picked from commit 4f4478f0f31263997bfdc4159f90e58dd79b38f9)
Comment 4 Richard Biener 2024-07-16 14:23:46 UTC
Fixed.