This fixes r16-2134-gf33cc3af8fd9c4 which extended some patterns to
support vector types but these patterns are only valid for integral
types and the check that was used was VECTOR_TYPE.
This fixes it by using VECTOR_INTEGRAL_TYPE || VECTOR_BOOLCEAN_TYPE
which prevent the, for vector floating point types.

Pushed as obvious after bootstrap/test on x86_64-linux-gnu.

gcc/ChangeLog:

        * match.pd: Fix up patterns dealing with bitwise AND/OR/XOR
        and comparisons for floating point types.

Signed-off-by: Andrea Pinski <[email protected]>
---
 gcc/match.pd | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/gcc/match.pd b/gcc/match.pd
index b67a2c9fdde..9669a22ef68 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -3508,7 +3508,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
    (if ((TREE_CODE (@1) == INTEGER_CST
         && TREE_CODE (@2) == INTEGER_CST)
        || ((INTEGRAL_TYPE_P (TREE_TYPE (@1))
-   || (VECTOR_TYPE_P (TREE_TYPE (@1))
+   || ((VECTOR_INTEGER_TYPE_P (TREE_TYPE (@1))
+       || VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (@1)))
    && expand_vec_cmp_expr_p (TREE_TYPE (@1), type, code2))
             || POINTER_TYPE_P (TREE_TYPE (@1)))
            && bitwise_equal_p (@1, @2)))
@@ -3599,7 +3600,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
   (if ((TREE_CODE (@1) == INTEGER_CST
        && TREE_CODE (@2) == INTEGER_CST)
        || ((INTEGRAL_TYPE_P (TREE_TYPE (@1))
-       || (VECTOR_TYPE_P (TREE_TYPE (@1))
+       || ((VECTOR_INTEGER_TYPE_P (TREE_TYPE (@1))
+           || VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (@1)))
        && expand_vec_cmp_expr_p (TREE_TYPE (@1), type, code2))
            || POINTER_TYPE_P (TREE_TYPE (@1)))
           && operand_equal_p (@1, @2)))
@@ -3789,7 +3791,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
    (op:c (cmp1:c @0 @1) (cmp2 @0 @1))
    (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
       || POINTER_TYPE_P (TREE_TYPE (@0))
-      || (VECTOR_TYPE_P (TREE_TYPE (@1))
+      || ((VECTOR_INTEGER_TYPE_P (TREE_TYPE (@1))
+          || VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (@1)))
       && expand_vec_cmp_expr_p (TREE_TYPE (@0), type, rcmp)))
     (rcmp @0 @1)))))
 
@@ -3801,7 +3804,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
   (eq:c (cmp1:c @0 @1) (cmp2 @0 @1))
   (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
                || POINTER_TYPE_P (TREE_TYPE (@0))
-      || (VECTOR_TYPE_P (TREE_TYPE (@0))
+      || ((VECTOR_INTEGER_TYPE_P (TREE_TYPE (@1))
+          || VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (@1)))
       && expand_vec_cmp_expr_p (TREE_TYPE (@0), type,  rcmp)))
     (rcmp @0 @1))))
 
-- 
2.43.0

Reply via email to