diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-30 09:45:40 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-30 09:45:40 +0000 |
commit | 65aa25a4430017f9d72cd3ccfaf25bd589908bc6 (patch) | |
tree | 311a6f51a237132eeaeee25ece76fb9d2758df07 /gcc | |
parent | 502f6447868803d2af85f3d6d09ae50254b25dc6 (diff) | |
download | gcc-65aa25a4430017f9d72cd3ccfaf25bd589908bc6.zip gcc-65aa25a4430017f9d72cd3ccfaf25bd589908bc6.tar.gz gcc-65aa25a4430017f9d72cd3ccfaf25bd589908bc6.tar.bz2 |
Expand vec_perm_indices::series_p comment
2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* vec-perm-indices.c (vec_perm_indices::series_p): Give examples
of usage.
From-SVN: r257176
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/vec-perm-indices.c | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aafaa36..4aecf47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-01-30 Richard Sandiford <richard.sandiford@linaro.org> + + * vec-perm-indices.c (vec_perm_indices::series_p): Give examples + of usage. + 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/81550 diff --git a/gcc/vec-perm-indices.c b/gcc/vec-perm-indices.c index 53dbe0d..9248961 100644 --- a/gcc/vec-perm-indices.c +++ b/gcc/vec-perm-indices.c @@ -114,7 +114,18 @@ vec_perm_indices::rotate_inputs (int delta) } /* Return true if index OUT_BASE + I * OUT_STEP selects input - element IN_BASE + I * IN_STEP. */ + element IN_BASE + I * IN_STEP. For example, the call to test + whether a permute reverses a vector of N elements would be: + + series_p (0, 1, N - 1, -1) + + which would return true for { N - 1, N - 2, N - 3, ... }. + The calls to test for an interleaving of elements starting + at N1 and N2 would be: + + series_p (0, 2, N1, 1) && series_p (1, 2, N2, 1). + + which would return true for { N1, N2, N1 + 1, N2 + 1, ... }. */ bool vec_perm_indices::series_p (unsigned int out_base, unsigned int out_step, |