]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid expand_vec_cond_expr_p with comparison code
authorRichard Biener <rguenther@suse.de>
Tue, 12 Nov 2024 13:45:02 +0000 (14:45 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Nov 2024 10:37:55 +0000 (11:37 +0100)
This removes the obsolete API use by vector divmod lowering.

* tree-vect-generic.cc (expand_vector_divmod): Query vector
comparison and vec_cond_mask capability.

gcc/tree-vect-generic.cc

index 21d906e9c5594d96e8dcfa94015ff44064f882ec..72f251f09620be056eb8008de5c1c6781e1fef64 100644 (file)
@@ -765,8 +765,10 @@ expand_vector_divmod (gimple_stmt_iterator *gsi, tree type, tree op0,
                                              type, cur_op);
                }
            }
+         tree mask_type = truth_type_for (type);
          if (addend == NULL_TREE
-             && expand_vec_cond_expr_p (type, type, LT_EXPR))
+             && expand_vec_cmp_expr_p (type, mask_type, LT_EXPR)
+             && expand_vec_cond_expr_p (type, mask_type))
            {
              tree zero, cst, mask_type, mask;
              gimple *stmt, *cond;