From 821ef93976e750c118d42a2ad33b96dbd1b9f3a5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 10 Feb 2023 13:09:10 +0100 Subject: tree-optimization/108752 - vectorize emulated vectors in lowered form The following makes sure to emit operations lowered to bit operations when vectorizing using emulated vectors. This avoids relying on the vector lowering pass adhering to the exact same cost considerations as the vectorizer. PR tree-optimization/108752 * tree-vect-generic.cc (build_replicated_const): Rename to build_replicated_int_cst and move to tree.{h,cc}. (do_plus_minus): Adjust. (do_negate): Likewise. * tree-vect-stmts.cc (vectorizable_operation): Emit emulated arithmetic vector operations in lowered form. * tree.h (build_replicated_int_cst): Declare. * tree.cc (build_replicated_int_cst): Moved from tree-vect-generic.cc build_replicated_const. --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index dc94c17..0b72663 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4685,6 +4685,7 @@ extern tree build_one_cst (tree); extern tree build_minus_one_cst (tree); extern tree build_all_ones_cst (tree); extern tree build_zero_cst (tree); +extern tree build_replicated_int_cst (tree, unsigned, HOST_WIDE_INT); extern tree sign_mask_for (tree); extern tree build_string (unsigned, const char * = NULL); extern tree build_poly_int_cst (tree, const poly_wide_int_ref &); -- cgit v1.1