diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-11-14 15:09:24 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-11-14 15:09:24 +0000 |
commit | 7f52eb891b738337d5cf82c7c440a5eea8c7b0c9 (patch) | |
tree | 506097990ebddb07bb543ec0c1e3f8802a885945 /gcc | |
parent | 2df4150075c03f8a292c40afd3bb25febb673578 (diff) | |
download | gcc-7f52eb891b738337d5cf82c7c440a5eea8c7b0c9.zip gcc-7f52eb891b738337d5cf82c7c440a5eea8c7b0c9.tar.gz gcc-7f52eb891b738337d5cf82c7c440a5eea8c7b0c9.tar.bz2 |
Require equal type sizes for vectorised calls
As explained in the comment, vectorizable_call needs more work to
support mixtures of sizes. This avoids testsuite fallout for
later SVE patches.
2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vect-stmts.c (vectorizable_call): Require the types
to have the same size.
From-SVN: r278239
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-vect-stmts.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28baebe..41c9414 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-11-14 Richard Sandiford <richard.sandiford@arm.com> + * tree-vect-stmts.c (vectorizable_call): Require the types + to have the same size. + +2019-11-14 Richard Sandiford <richard.sandiford@arm.com> + * tree-vect-stmts.c (vectorizable_call): If an operand is constant or external, use get_vectype_for_scalar_type rather than get_same_sized_vectype to get its vector type. diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index b7fff78..80f59ac 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3309,6 +3309,19 @@ vectorizable_call (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, return false; } + /* FORNOW: we don't yet support mixtures of vector sizes for calls, + just mixtures of nunits. E.g. DI->SI versions of __builtin_ctz* + are traditionally vectorized as two VnDI->VnDI IFN_CTZs followed + by a pack of the two vectors into an SI vector. We would need + separate code to handle direct VnDI->VnSI IFN_CTZs. */ + if (TYPE_SIZE (vectype_in) != TYPE_SIZE (vectype_out)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "mismatched vector sizes %T and %T\n", + vectype_in, vectype_out); + return false; + } /* FORNOW */ nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in); |