This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lno] [patch] vectorizer and altivec.md bitwise operations support


The following patch extends the vectorizer to support bitwise operations.
With the new support, the following can be vectorized:
(1)   a[i] = b[i] & c[i];
(2)   a[i] = b[i] | c[i];
(3)   a[i] = b[i] ^ c[i];
(4)   a[i] = ~b[i];

As part of the patch, the vectorizer was extended to support unary
operations.

rs6000 specific updates:
- modelling of one's complement was added to altivec.md, as well as
modelling of bitwise and/or for additional data types (previously modelled
only for V4SI).
- a fix following http://gcc.gnu.org/ml/gcc/2004-03/msg00235.html.

Olga and Dorit.

        * tree-vectorizer.c: (vect_transform_binop): Removed.
        (vect_transform_op): New function instead of vect_transform_binop,
        to support both unary and binary operations.
        (vect_is_supportable_binop): Removed.
        (vect_is_supportable_op): New function instead of
        vect_is_supportable_binop to support additional codes.
        * tree-vectorizer.h: (operation_type): New enum type declared.
        * config/rs6000/altivec.md: (andvv16qi3, andv8hi3, one_cmplv16qi2,
        one_cmplv8hi2, one_cmplv4si2, iorv16qi3, iorv8hi3,): New modelling.
        (*movv4si_internal): Relax condition.
        (*movv8hi_internal1): Likewise.
        (*movv16qi_internal1): Likewise.
        (*movv4sf_internal1): Likewise.

(See attached file: diff.March9)


Attachment: diff.March9
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]