]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove last comparison-code expand_vec_cond_expr_p call from vectorizer
authorRichard Biener <rguenther@suse.de>
Tue, 12 Nov 2024 12:55:14 +0000 (13:55 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Nov 2024 10:37:55 +0000 (11:37 +0100)
The following refactors the check with the last remaininig
expand_vec_cond_expr_p call with a comparison code to make it
obvious we are not relying on those anymore.

* tree-vect-stmts.cc (vectorizable_condition): Refactor
target support check.

gcc/tree-vect-stmts.cc

index 5d731205675eaeb8732b260d81d4ea546512b398..a83a46ea0dd9104a0a37adcaf519bbea71b18ec8 100644 (file)
@@ -12460,9 +12460,9 @@ vectorizable_condition (vec_info *vinfo,
       if (reduction_type == EXTRACT_LAST_REDUCTION)
        /* Count one reduction-like operation per vector.  */
        kind = vec_to_scalar;
-      else if (!expand_vec_cond_expr_p (vectype, comp_vectype, cond_code)
-              && (masked
-                  || (!expand_vec_cmp_expr_p (comp_vectype, vec_cmp_type,
+      else if ((masked && !expand_vec_cond_expr_p (vectype, comp_vectype))
+              || (!masked
+                  && (!expand_vec_cmp_expr_p (comp_vectype, vec_cmp_type,
                                               cond_code)
                       || !expand_vec_cond_expr_p (vectype, vec_cmp_type))))
        return false;