https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100645
Bug ID: 100645 Summary: ICE in related_vector_mode, at stor-layout.c:537 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: powerpc-*-linux-gnu gcc-12.0.0-alpha20210516 snapshot (g:4a322345cab10879162a2ddf659fb0f873ba0182) ICEs when compiling the following testcase, extracted from gcc/testsuite/gcc.target/i386/sse2-pr94680.c, w/ -maltivec: typedef long long v2di __attribute__((vector_size(16))); v2di foo_v2di_l (v2di x) { return __builtin_shuffle ((v2di) { 0, 0 }, x, (v2di) {3, 0}); } % powerpc-e300c3-linux-gnu-gcc-12.0.0 -maltivec -c z7u847kc.c during RTL pass: expand z7u847kc.c: In function 'foo_v2di_l': z7u847kc.c:6:10: internal compiler error: in related_vector_mode, at stor-layout.c:537 6 | return __builtin_shuffle ((v2di) { 0, 0 }, x, (v2di) {3, 0}); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x69756e related_vector_mode(machine_mode, scalar_mode, poly_int<1u, unsigned long>) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/stor-layout.c:537 0xd0b1e3 expand_vec_perm_const(machine_mode, rtx_def*, rtx_def*, int_vector_builder<poly_int<1u, long> > const&, machine_mode, rtx_def*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/optabs.c:6003 0xa8fc09 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/expr.c:10033 0x964ee5 expand_gimple_stmt_1 /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cfgexpand.c:3950 0x964ee5 expand_gimple_stmt /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cfgexpand.c:4011 0x96aa86 expand_gimple_basic_block /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cfgexpand.c:6053 0x96c5cf execute /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cfgexpand.c:6737