public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [00/13] Make VEC_PERM_EXPR work for variable-length vectors
@ 2017-12-09 23:06 Richard Sandiford
  2017-12-09 23:08 ` [01/13] Add a qimode_for_vec_perm helper function Richard Sandiford
                   ` (11 more replies)
  0 siblings, 12 replies; 46+ messages in thread
From: Richard Sandiford @ 2017-12-09 23:06 UTC (permalink / raw)
  To: gcc-patches

This series is a replacement for:
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00747.html
based on the feedback that using VEC_PERM_EXPR would be better.

The changes are:

(1) Remove the restriction that the selector elements have to have the
    same width as the data elements, but only for constant selectors.
    This lets through the cases we need without also allowing
    potentially-expensive ops.  Adding support for the variable
    case can be done later if it seems useful, but it's not trivial.

(2) Encode the integer form of constant selectors (vec_perm_indices)
    in the same way as the new VECTOR_CST encoding, so that it can
    cope with variable-length vectors.

(3) Remove the vec_perm_const optab and reuse the target hook to emit
    code.  This avoids the need to create a CONST_VECTOR for the wide
    selectors, and hence the need to have a corresponding wide vector
    mode (which the target wouldn't otherwise need or support).

(4) When handling the variable vec_perm optab, check that modes can store
    all element indices before using them.

(5) Unconditionally use ssizetype selector elements in permutes created
    by the vectoriser.

(6) Make the AArch64 vec_perm_const handling handle variable-length vectors.

Tested directly on trunk on aarch64-linux-gnu, x86_64-linux-gnu and
powerpc64le-linux-gnu.  Also tested by comparing the before and after
assembly output for:

   arm-linux-gnueabi arm-linux-gnueabihf aarch64-linux-gnu
   aarch64_be-linux-gnu ia64-linux-gnu i686-pc-linux-gnu
   mipsisa64-linux-gnu mipsel-linux-gnu powerpc64-linux-gnu
   powerpc64le-linux-gnu powerpc-eabispe x86_64-linux-gnu
   sparc64-linux-gnu

at -O3, which should cover all the ports that defined vec_perm_const.
The only difference was one instance of different RA for ia64-linux-gnu,
caused by using force_reg on a SUBREG that was previously used directly.

OK to install?

Thanks,
Richard

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2018-01-30  6:11 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-09 23:06 [00/13] Make VEC_PERM_EXPR work for variable-length vectors Richard Sandiford
2017-12-09 23:08 ` [01/13] Add a qimode_for_vec_perm helper function Richard Sandiford
2017-12-18 13:34   ` Richard Biener
2017-12-09 23:09 ` [02/13] Pass vec_perm_indices by reference Richard Sandiford
2017-12-12 14:23   ` Richard Biener
2017-12-09 23:11 ` [03/13] Split can_vec_perm_p into can_vec_perm_{var,const}_p Richard Sandiford
2017-12-12 14:25   ` Richard Biener
2017-12-09 23:13 ` [04/13] Refactor expand_vec_perm Richard Sandiford
2017-12-12 15:17   ` Richard Biener
2017-12-09 23:17 ` [05/13] Remove vec_perm_const optab Richard Sandiford
2017-12-12 15:26   ` Richard Biener
2017-12-20 13:42     ` Richard Sandiford
2017-12-09 23:18 ` [06/13] Check whether a vector of QIs can store all indices Richard Sandiford
2017-12-12 15:27   ` Richard Biener
2017-12-09 23:20 ` [07/13] Make vec_perm_indices use new vector encoding Richard Sandiford
2017-12-12 15:32   ` Richard Biener
2017-12-12 15:47     ` Richard Sandiford
2017-12-14 10:37       ` Richard Biener
2017-12-20 13:48         ` Richard Sandiford
2018-01-02 13:15           ` Richard Biener
2018-01-02 18:30             ` Richard Sandiford
2017-12-09 23:20 ` [08/13] Add a vec_perm_indices_to_tree helper function Richard Sandiford
2017-12-18 13:34   ` Richard Biener
2017-12-09 23:21 ` [09/13] Use explicit encodings for simple permutes Richard Sandiford
2017-12-19 20:37   ` Richard Sandiford
2018-01-02 13:07   ` Richard Biener
2017-12-09 23:23 ` [10/13] Rework VEC_PERM_EXPR folding Richard Sandiford
2017-12-09 23:24   ` [11/13] Use vec_perm_builder::series_p in shift_amt_for_vec_perm_mask Richard Sandiford
2017-12-19 20:37     ` Richard Sandiford
2018-01-02 13:08     ` Richard Biener
2017-12-09 23:25   ` [12/13] Use ssizetype selectors for autovectorised VEC_PERM_EXPRs Richard Sandiford
2017-12-19 20:37     ` Richard Sandiford
2018-01-02 13:09     ` Richard Biener
2017-12-19 20:37   ` [10/13] Rework VEC_PERM_EXPR folding Richard Sandiford
2018-01-02 13:08   ` Richard Biener
2017-12-09 23:27 ` [13/13] [AArch64] Use vec_perm_indices helper routines Richard Sandiford
2017-12-19 20:37   ` Richard Sandiford
2018-01-04 11:28     ` Richard Sandiford
2018-01-09 12:18       ` James Greenhalgh
2018-01-09 16:24         ` RFA: Expand vec_perm_indices::series_p comment Richard Sandiford
2018-01-29 20:56           ` Ping: " Richard Sandiford
2018-01-30  7:20             ` Jeff Law
2017-12-12 14:12 ` [00/13] Make VEC_PERM_EXPR work for variable-length vectors Richard Biener
2017-12-12 15:32   ` Richard Sandiford
2017-12-12 15:38     ` Richard Biener
2017-12-12 15:57       ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).