build_same_sized_truth_vector_type was confusingly named, since for SVE and AVX512 the returned vector isn't the same byte size (although it does have the same number of elements). What it really returns is the "truth" vector type for a given data vector type. The more general truth_type_for provides the same thing when passed a vector and IMO has a more descriptive name, so this patch replaces all uses of build_same_sized_truth_vector_type with that. It does the same for a call to build_truth_vector_type, leaving truth_type_for itself as the only remaining caller. It's then more natural to pass build_truth_vector_type the original vector type rather than its size and nunits, especially since the given size isn't the size of the returned vector. This in turn allows a future patch to simplify the interface of get_mask_mode. Doing this also fixes a bug in which truth_type_for would pass a size of zero for BLKmode vector types. 2019-11-14 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree.h (build_truth_vector_type): Delete. (build_same_sized_truth_vector_type): Likewise. * tree.c (build_truth_vector_type): Rename to... (build_truth_vector_type_for): ...this. Make static and take a vector type as argument. (truth_type_for): Update accordingly. (build_same_sized_truth_vector_type): Delete. * tree-vect-generic.c (expand_vector_divmod): Use truth_type_for instead of build_same_sized_truth_vector_type. * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise. (vect_record_loop_mask, vect_get_loop_mask): Likewise. * tree-vect-patterns.c (build_mask_conversion): Likeise. * tree-vect-slp.c (vect_get_constant_vectors): Likewise. * tree-vect-stmts.c (vect_get_vec_def_for_operand): Likewise. (vect_build_gather_load_calls, vectorizable_call): Likewise. (scan_store_can_perm_p, vectorizable_scan_store): Likewise. (vectorizable_store, vectorizable_condition): Likewise. (get_mask_type_for_scalar_type, get_same_sized_vectype): Likewise. (vect_get_mask_type_for_stmt): Use truth_type_for instead of build_truth_vector_type. * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::convert_pred): Use truth_type_for instead of build_same_sized_truth_vector_type. * config/rs6000/rs6000-call.c (fold_build_vec_cmp): Likewise. gcc/c/ * c-typeck.c (build_conditional_expr): Use truth_type_for instead of build_same_sized_truth_vector_type. (build_vec_cmp): Likewise. gcc/cp/ * call.c (build_conditional_expr_1): Use truth_type_for instead of build_same_sized_truth_vector_type. * typeck.c (build_vec_cmp): Likewise. gcc/d/ * d-codegen.cc (build_boolop): Use truth_type_for instead of build_same_sized_truth_vector_type. From-SVN: r278232
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
dmd | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog-2006 | Loading commit data... | |
ChangeLog-2007 | Loading commit data... | |
ChangeLog-2008 | Loading commit data... | |
ChangeLog-2009 | Loading commit data... | |
ChangeLog-2010 | Loading commit data... | |
ChangeLog-2011 | Loading commit data... | |
ChangeLog-2012 | Loading commit data... | |
ChangeLog-2013 | Loading commit data... | |
ChangeLog-2014 | Loading commit data... | |
ChangeLog-2015 | Loading commit data... | |
ChangeLog-2016 | Loading commit data... | |
ChangeLog-2017 | Loading commit data... | |
ChangeLog-2018 | Loading commit data... | |
Make-lang.in | Loading commit data... | |
README.gcc | Loading commit data... | |
config-lang.in | Loading commit data... | |
d-attribs.cc | Loading commit data... | |
d-builtins.cc | Loading commit data... | |
d-codegen.cc | Loading commit data... | |
d-convert.cc | Loading commit data... | |
d-diagnostic.cc | Loading commit data... | |
d-frontend.cc | Loading commit data... | |
d-incpath.cc | Loading commit data... | |
d-lang.cc | Loading commit data... | |
d-longdouble.cc | Loading commit data... | |
d-spec.cc | Loading commit data... | |
d-system.h | Loading commit data... | |
d-target-def.h | Loading commit data... | |
d-target.cc | Loading commit data... | |
d-target.def | Loading commit data... | |
d-target.h | Loading commit data... | |
d-tree.def | Loading commit data... | |
d-tree.h | Loading commit data... | |
decl.cc | Loading commit data... | |
expr.cc | Loading commit data... | |
gdc.texi | Loading commit data... | |
imports.cc | Loading commit data... | |
intrinsics.cc | Loading commit data... | |
intrinsics.def | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lang.opt | Loading commit data... | |
longdouble.h | Loading commit data... | |
modules.cc | Loading commit data... | |
runtime.cc | Loading commit data... | |
runtime.def | Loading commit data... | |
toir.cc | Loading commit data... | |
typeinfo.cc | Loading commit data... | |
types.cc | Loading commit data... | |
verstr.h | Loading commit data... |