https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123294
Bug ID: 123294
Summary: [14/15/16 Regression] ICE at -O1 during RTL pass: ce2
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: xxs_chy at outlook dot com
Target Milestone: ---
Reproducer: https://godbolt.org/z/1cq9e37z8
It works at 14.2.0, and fails at 14.3.0.
Testcase:
#define BS_VEC(type, num) type __attribute__((vector_size(num * sizeof(type))))
#define BITCAST(T, F, arg) (union { T dst }){}.dst
#include <arm_neon.h>
#define BARRIER_v2u32(x) vqadd_u32(x, (BS_VEC(uint32_t, 2)){})
#define BARRIER_u16(x) vqadd_u64((uint64x1_t){ x }, (uint64x1_t){})[0]
uint8_t backsmith_pure_0(BS_VEC(int16_t, 16), BS_VEC(uint64_t, 2),
BS_VEC(int16_t, 4));
BS_VEC(uint32_t, 4) backsmith_pure_5(BS_VEC(uint64_t, 8) BS_ARG_1)
{
int8_t BS_VAR_1;
BS_VEC(uint32_t, 4) BS_VAR_3[9];
BS_VAR_1 = backsmith_pure_0(
__builtin_convertvector(__builtin_shufflevector(BS_ARG_1, BS_ARG_1, 0,
7, 4, 4, 7, 1, 7, 7, 2,
5, 4, 8, 5, 9, 8, 6),
BS_VEC(int16_t, 16)),
(BS_VEC(uint64_t, 2)){}, (BS_VEC(int16_t, 4)){});
for (uint64_t BS_INC_0 = 0;;)
{
if (0 > BS_VAR_1)
BS_VAR_3[0] = __builtin_shufflevector(
BITCAST(BS_VEC(uint32_t, 16), , ),
__builtin_shufflevector(BARRIER_v2u32((BS_VEC(uint32_t, 2)){}),
BARRIER_v2u32((BS_VEC(uint32_t, 2)){}),
3, 2, 2, 2, 1, 1, 0, 2, 3, 0, 2, 0, 1,
1, 3, 1),
24, 4, 9, 28);
for (uint32_t BS_INC_1; BS_INC_1;)
{
uint32_t BS_TEMP_464 = BARRIER_u16(3);
uint32_t BS_TEMP_465 = BS_TEMP_464;
for (; BS_TEMP_465;) return BS_VAR_3[9];
if (BS_VAR_3[0][3]) BS_VAR_1 = 0;
}
}
}
Command:
> aarch64-unknown-linux-musl-gcc -O1 test.c
Dump:
during RTL pass: ce2
<source>: In function 'backsmith_pure_5':
<source>:36:1: internal compiler error: in expand_shift_1, at expmed.cc:2692
36 | }
| ^
0x76236e229e3f __libc_start_main
???:0
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.
Compiler returned: 1