https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125670
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-06-14
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
It's a bit unclear what's supposed to happen here. We have this insn:
(insn 27 23 68 2 (set (reg:V4BI 97 v1 [orig:134 mask_patt_34.43 ] [134])
(if_then_else:V4BI (unspec:V4BI [
(const_vector:V4BI [
(const_int 1 [0x1]) repeated x4
])
(const_int 4 [0x4])
(const_int 1 [0x1])
(reg:SI 66 vl)
(reg:SI 67 vtype)
] UNSPEC_VPREDICATE)
(const_vector:V4BI [
(const_int 0 [0]) repeated x4
])
(unspec:V4BI [
(reg:DI 0 zero)
] UNSPEC_VUNDEF))) 4220 {pred_movv4bi}
(expr_list:REG_DEAD (reg:DI 0 zero)
(nil)))
We call the has_vl method. That pulls out (const_int 4) and promptly ICEs
because of the assert that indicates VL can only be NULL_RTX or a REG. The
predicate is vector_length_operand which allows small constants via
const_csr_operand. So it's a bit odd that a predicate like has_vl aborts when
encountering the constant.