https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127499
Bug ID: 127499
Summary: ICE: in ix86_erase_embedded_rounding, at
config/i386/i386-expand.cc:13701 with -ftree-ter
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: kyuwoncho18 at gmail dot com
Target Milestone: ---
### Reproducer
typedef double __v8df __attribute__((__vector_size__(64)));
typedef long long __v8di __attribute__((__vector_size__(64)));
__v8df f (__v8di x, __v8di y, __v8df b, __v8df s, unsigned char m)
{
return __builtin_ia32_maxpd512_mask ((__v8df) (x + y), b, s, m, 4);
}
$ gcc -O0 -mavx512f -c repro.c && echo $?
0
$ gcc -O0 -ftree-ter -mavx512f -c repro.c
during RTL pass: expand
<source>: In function 'f':
<source>:6:10: internal compiler error: in ix86_erase_embedded_rounding, at
config/i386/i386-expand.cc:13701
6 | return __builtin_ia32_maxpd512_mask ((__v8df) (x + y), b, s, m, 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x28bef98 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x28b3bdb internal_error(char const*, ...)
???:0
0xa780ea fancy_abort(char const*, int, char const*)
???:0
0x17f9e42 ix86_expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode,
int)
???:0
0xda570e expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0xdb1faf store_expr(tree_node*, rtx_def*, int, bool, bool)
???:0
/cefs/de/de578291e2d33c7d5058ba67_gcc-trunk-20260918/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/de/de578291e2d33c7d5058ba67_gcc-trunk-20260918/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
<source> -quiet -dumpdir /app/ -dumpbase output.c -dumpbase-ext .c -masm=intel
-mavx512f -mtune=generic -march=x86-64 -g -O0 -fdiagnostics-color=always
-fno-verbose-asm -ftree-ter -o /app/output.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.
Compiler returned: 1