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

            Bug ID: 126512
           Summary: ICE in copy_to_mode_reg, at explow.cc:657, mno-vsx
                    with vec_sel builtin
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mjires at gcc dot gnu.org
                CC: cel at linux dot ibm.com
  Target Milestone: ---
            Target: ppc64le-linux-gnu

Compiling reduced testcase gcc.target/powerpc/builtins-10-runnable.c results in
ICE since added in r15-1921-g807bed024d03f7.

$ cat builtins-10-runnable.c
#include <altivec.h>
void main() {
  vector unsigned __int128 src_vc_u128;
  vector bool __int128 src_va_b128;
  vector bool __int128 src_vb_b128 =
      vec_sel(src_va_b128, src_vb_b128, src_vc_u128);
}


$ ppc64le-linux-gnu-gcc builtins-10-runnable.c -mno-vsx
during RTL pass: expand
builtins-10-runnable.c: In function ‘main’:
builtins-10-runnable.c:5:24: internal compiler error: in copy_to_mode_reg, at
explow.cc:657
    5 |   vector bool __int128 src_vb_b128 =
      |                        ^~~~~~~~~~~
0x2249697 internal_error(char const*, ...)
        /home/mjires/git/GCC/master/gcc/diagnostic-global-context.cc:787
0x2254b63 fancy_abort(char const*, int, char const*)
        /home/mjires/git/GCC/master/gcc/diagnostics/context.cc:1813
0xac4561 copy_to_mode_reg(machine_mode, rtx_def*)
        /home/mjires/git/GCC/master/gcc/explow.cc:657
0x15ffe5c rs6000_expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode,
int)
        /home/mjires/git/GCC/master/gcc/config/rs6000/rs6000-builtin.cc:3822
0x977fc0 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        /home/mjires/git/GCC/master/gcc/builtins.cc:7854
0xaef2e4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:12750
0xaf05b5 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:9655
0xafbe79 store_expr(tree_node*, rtx_def*, int, bool, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:6829
0xafd7a6 expand_assignment(tree_node*, tree_node*, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:6525
0x9a5c01 expand_call_stmt
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:3233
0x9a5c01 expand_gimple_stmt_1
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:4273
0x9a5c01 expand_gimple_stmt
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:4420
0x9acb56 expand_gimple_basic_block
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:6537
0x9ae8dc execute
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:7288
/home/mjires/built/master-ppc64le-linux-gnu/libexec/gcc/ppc64le-linux-gnu/17.0.0/cc1
-quiet builtins-10-runnable.c -quiet -dumpdir a- -dumpbase
builtins-10-runnable.c -dumpbase-ext .c -mno-vsx -o /tmp/ccEzudtM.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


$ ppc64le-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=ppc64le-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master-ppc64le-linux-gnu/libexec/gcc/ppc64le-linux-gnu/17.0.0/lto-wrapper
Target: ppc64le-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master-ppc64le-linux-gnu --target=ppc64le-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master-ppc64le-linux-gnu --target=ppc64le-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260730 (experimental) (GCC)

Reply via email to