https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125967
Bug ID: 125967
Summary: [17 Regression] ICE when building 523.xalancbmk_r
since r17-1766-g1f774d902f1ec9
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pheeck at gcc dot gnu.org
CC: hjl at gcc dot gnu.org
Blocks: 26163
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Building the SPEC CPU 2017 benchmark 523.xalancbmk_r with -O2 generic march
-flto results in an ICE. So far I've seen this on AMD Zen{3,4,5} and on Intel
Ice Lake (3rd generation Xeon) machines.
StylesheetExecutionContextDefault.cpp: In member function
'createFormatterToHTML':
StylesheetExecutionContextDefault.cpp:1455:1: error: insn does not satisfy its
constraints:
1455 | }
| ^
(insn 2972 204 2881 10 (set (mem:HI (plus:DI (reg/f:DI 3 bx [orig:278 <retval>
] [278])
(const_int 40 [0x28])) [34 MEM[(struct FormatterToXML
*)_36].m_maxCharacter+0 S2 A64])
(reg:HI 20 xmm0 [299])) "FormatterToXML.cpp":75:5 101 {*movhi_internal}
(expr_list:REG_DEAD (reg:HI 20 xmm0 [299])
(nil)))
during RTL pass: cprop_hardreg
StylesheetExecutionContextDefault.cpp:1455:1: internal compiler error: in
extract_constrain_insn, at recog.cc:2795
0x1f48eec internal_error(char const*, ...)
/home/gcc/buildworker/lntzen5-gcc-trunk-workdays/build/gcc/diagnostic-global-context.cc:787
0x7aba3b fancy_abort(char const*, int, char const*)
/home/gcc/buildworker/lntzen5-gcc-trunk-workdays/build/gcc/diagnostics/context.cc:1813
0x78248a _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/gcc/buildworker/lntzen5-gcc-trunk-workdays/build/gcc/rtl-error.cc:108
0x7824b0 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/gcc/buildworker/lntzen5-gcc-trunk-workdays/build/gcc/rtl-error.cc:118
0x78167f extract_constrain_insn(rtx_insn*)
/home/gcc/buildworker/lntzen5-gcc-trunk-workdays/build/gcc/recog.cc:2795
0xce9548 copyprop_hardreg_forward_1
/home/gcc/buildworker/lntzen5-gcc-trunk-workdays/build/gcc/regcprop.cc:881
0xcea731 execute
/home/gcc/buildworker/lntzen5-gcc-trunk-workdays/build/gcc/regcprop.cc:1474
I've bisected the ICE to r17-1766-g1f774d902f1ec9
commit 1f774d902f1ec9ae6a487e00ba49514d3b37057f
Author: H.J. Lu <[email protected]>
AuthorDate: Sun Jun 21 07:13:38 2026 +0800
Commit: H.J. Lu <[email protected]>
CommitDate: Tue Jun 23 15:01:47 2026 +0800
x86: Use previous scratch register in LCP stall peepholes
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2026, 2k17, 2k and 2k6 and
95)