From fa4a8b6463e0dbc2a072fca835d28ae7a57849d5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 11 Dec 2020 10:07:10 +0100 Subject: [PATCH] tree-optimization/95582 - fix vector pattern with bool conversions The pattern recognizer fends off against recognizing conversions from VECT_SCALAR_BOOLEAN_TYPE_P to precision one types but what it really needs to fend off is conversions between VECT_SCALAR_BOOLEAN_TYPE_P types - the Ada FE uses an 8 bit boolean type that satisfies this predicate. 2020-12-11 Richard Biener PR tree-optimization/95582 * tree-vect-patterns.c (vect_recog_bool_pattern): Check for VECT_SCALAR_BOOLEAN_TYPE_P, not just precision one. --- gcc/tree-vect-patterns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index f2ce75a..bf57c49 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -4067,7 +4067,7 @@ vect_recog_bool_pattern (vec_info *vinfo, || rhs_code == VIEW_CONVERT_EXPR) { if (! INTEGRAL_TYPE_P (TREE_TYPE (lhs)) - || TYPE_PRECISION (TREE_TYPE (lhs)) == 1) + || VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (lhs))) return NULL; vectype = get_vectype_for_scalar_type (vinfo, TREE_TYPE (lhs)); if (vectype == NULL_TREE) -- 2.7.4