https://gcc.gnu.org/g:fd48e9e690e9c83932be5846577597582a4eeec6
commit r17-6677-gfd48e9e690e9c83932be5846577597582a4eeec6 Author: Jakub Jelinek <[email protected]> Date: Wed Nov 25 09:57:42 2026 +0100 vect: Use BITINT_TYPE_P in the vectorizer After writing the last patch I've noticed 3 TREE_CODE tests against BITINT_TYPE in the vectorizer which also won't handle ENUMERAL_TYPEs with underlying BITINT_TYPE. 2026-11-25 Jakub Jelinek <[email protected]> * tree-vect-stmts.cc (vectorizable_conversion, vectorizable_load, vectorizable_comparison_1): Use BITINT_TYPE_P macro instead of comparing TREE_CODE to BITINT_TYPE. Reviewed-by: Richard Biener <[email protected]> Diff: --- gcc/tree-vect-stmts.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 50aeca2780ac..5c5552b400ec 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -5484,7 +5484,7 @@ vectorizable_conversion (vec_info *vinfo, /* _BitInt values are not sign-/zero-extended to mode precision. */ if (!VECTOR_BOOLEAN_TYPE_P (vectype_out) - && TREE_CODE (rhs_type) == BITINT_TYPE + && BITINT_TYPE_P (rhs_type) && !type_has_mode_precision_p (rhs_type)) { if (dump_enabled_p ()) @@ -10005,7 +10005,7 @@ vectorizable_load (vec_info *vinfo, bool type_mode_padding_p = TYPE_PRECISION (scalar_type) < GET_MODE_PRECISION (GET_MODE_INNER (mode)); - if (TREE_CODE (scalar_type) == BITINT_TYPE + if (BITINT_TYPE_P (scalar_type) && !type_has_mode_precision_p (scalar_type)) { if (dump_enabled_p ()) @@ -12603,7 +12603,7 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype, /* We cannot compare non-mode precision _BitInt types. Unlike bool or bit-precision INTEGER_TYPE the padding bit values are target dependent and possibly undefined. */ - if (TREE_CODE (TREE_TYPE (rhs1)) == BITINT_TYPE + if (BITINT_TYPE_P (TREE_TYPE (rhs1)) && !type_has_mode_precision_p (TREE_TYPE (rhs1))) return false;
