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]

[autovect] [patch] change vector shift to bit-shift instead of byte-shift





(forgot to send this, from two days ago)

The shift argument of VEC_LSHIFT_EXPR,VEC_RSHIFT_EXPR is now in bits
instead of bytes. The optabs vec_shli,vec_shri are also used to represent
bit shift instead of byte shift.
Bootstrapped and tested on powerpc-darwin, committed to autovect

Changelog:

        * optabs.c (expand_vec_shift_expr): Make sure GEN_FCN succeeded.
        * optabs.h (OTI_vec_shli, OTI_vec_shri): Update comment.
        * tree-vect-transform.c (vect_create_epilog_for_reduction):
Generate
        a shift in bits instead of bytes.
        * tree.def (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): Update comment.
        * config/rs6000/altivec.md (vec_shli_<mode>, vec_shri_<mode>):
        Take shift argument in bits instead of bytes.

Patch:

(See attached file: autovect.june17b)

Attachment: autovect.june17b
Description: Binary data


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