[Bug rtl-optimization/125875] [14/15/16/17 Regression] ICE at -Os during RTL pass: expand
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 18 13:21:30 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125875
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Priority|P3 |P2
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2026-06-18
Target| |x86_64-*-*
Target Milestone|--- |14.4
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
_12 = VEC_PERM_EXPR <{ 0, 0, 0, 0 }, g7.6_5, { 2, 3, 4, 7 }>;
and the expander fails. This is a V4HImode permute.
The specific VEC_PERM_EXPR appears during FRE5:
+Value numbering stmt = _12 = VEC_PERM_EXPR <{ 0, 0, 0, 0 }, g7.9_10, { 2, 3,
4, 5 }>;
+Matching expression match.pd:11625, gimple-match-2.cc:198
+Matching expression match.pd:11625, gimple-match-2.cc:198
+Applying pattern match.pd:11766, gimple-match-1.cc:28544
+Matching expression match.pd:11625, generic-match-5.cc:149
+Setting value number of _12 to _12 (changed)
+Matching expression match.pd:11625, gimple-match-2.cc:198
+Matching expression match.pd:11625, gimple-match-2.cc:198
+Applying pattern match.pd:11766, gimple-match-1.cc:28544
+gimple_simplified to _12 = VEC_PERM_EXPR <{ 0, 0, 0, 0 }, g7.6_5, { 2, 3, 4, 7
}>;
where g7.9_10 == _7 and
_7 = VEC_PERM_EXPR <g7.6_5, g7.6_5, { 0, 3, 0, 1 }>;
The relevant pattern has verification though and that looks correct? We
detect the new permute as not supported by the target, but the feeding
permute is not.
Ah, the error is that we think a not allowed _constant_ permute would have
been lowered so we're before lowering. But that's not accurate, we have
to allow variable permutes as well for such negative checks.
More information about the Gcc-bugs
mailing list