https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122655
Bug ID: 122655
Summary: [16 Regression] PowerPC64LE: ICE at -O1/O2/O3 during
GIMPLE pass: veclower2
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: xxs_chy at outlook dot com
Target Milestone: ---
Reproducer: https://godbolt.org/z/835c1vYh1
gcc version 16.0.0 20251111 (experimental) (crosstool-NG 1.28.0_rc1)
Testcase:
#include <stdint.h>
#define BS_VEC(type, num) type __attribute__((vector_size(num * sizeof(type))))
int16_t backsmith_pure_0(int64_t, int8_t, int16_t, BS_VEC(int8_t, 32),
BS_VEC(int8_t, 4), uint64_t);
BS_VEC(int16_t, 4) backsmith_pure_3(BS_VEC(uint64_t, 32)) {
BS_VEC(uint64_t, 2) BS_VAR_7;
uint64_t l_1355 = 18446744073709551607;
BS_VAR_7 *= (BS_VEC(uint64_t, 2)){l_1355, l_1355};
backsmith_pure_0(
9016885317, 0, 0,
__builtin_convertvector(
__builtin_shufflevector(backsmith_pure_3((BS_VEC(uint64_t, 32)){}),
backsmith_pure_3((BS_VEC(uint64_t, 32)){}),
5,
6, 6, 1, 2, 6, 6, 3, 4, 0, 7, 7, 6, 2, 4, 7,
0, 5, 1, 7, 2, 3, 6, 3, 7, 6, 7, 6, 3, 0, 7,
6),
BS_VEC(int8_t, 32)),
__builtin_convertvector((BS_VEC(int32_t, 4)){}, BS_VEC(int8_t, 4)),
BS_VAR_7[0]);
}
ICE output:
<source>: In function 'backsmith_pure_3':
<source>:7:21: warning: integer constant is so large that it is unsigned
7 | uint64_t l_1355 = 18446744073709551607;
| ^~~~~~~~~~~~~~~~~~~~
<source>:5:20: warning: GCC vector passed by reference: non-standard ABI
extension with no compatibility guarantee [-Wpsabi]
5 | BS_VEC(int16_t, 4) backsmith_pure_3(BS_VEC(uint64_t, 32)) {
| ^~~~~~~~~~~~~~~~
during GIMPLE pass: veclower2
<source>:5:20: internal compiler error: tree check: expected none of
vector_type, have vector_type in build_int_cst, at tree.cc:1647
0x22105e2 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x220534f internal_error(char const*, ...)
???:0
0x89dcb2 tree_not_check_failed(tree_node const*, char const*, int, char const*,
...)
???: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