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]

[PATCH] RS6000 : Add support for vector conditionals


My previous patches added vcond_gen_code optab for VEC_COND_EXPR.
This patch adds patterns and related functions for rs6000. All
functionality is added as new functions and new patterns. None
of the existing rs6000 functions are modified.

rs6000_emit_vector_cond_expr() is main function here. It is used
by new vcond* patterns. For selected existing patterns' indexes,
now constants are defined instead of hard coded numbers.

Bootstrapped and tested on powerpc-darwin.

OK ?
Thanks,
-
Devang

2004-09-15 Devang Patel <dpatel@apple.com>

* rs6000/altivec.md (UNSPEC_VCMPBFP, UNSPEC_VCMPEQUB, UNSPEC_VCMPEQUH,
UNSPEC_VCMPEQUW, UNSPEC_VCMPGEFP, UNSPEC_VCMPGTUB, UNSPEC_VCMPGTSB,
UNSPEC_VCMPGTUH, UNSPEC_VCMPGTSH, UNSPEC_VCMPGTUW, UNSPEC_VCMPGTSW,
UNSPEC_VCMPGTFP, UNSPEC_VSEL4SI, UNSPEC_VSEL4SF, UNSPEC_VSEL8HI,
UNSPEC_VSEL16QI, UNSPEC_VCOND_V4SI, UNSPEC_VCOND_V4SF, UNSPEC_VCOND_V8HI,
UNSPEC_VCOND_V16QI): New constant defines.
(vcondv4si, vcondv4sf, vcondv8hi, vcondv16qi): New patterns.
* rs6000/rs6000-protos.h (rs6000_emit_vector_cond_expr): New function.
* rs6000/rs6000.c (rs6000_emit_vector_cond_expr): New function.
(get_vec_cmp_insn): Same.
(get_vsel_insn): Same.
(rs6000_emit_vector_compare): Same.
(rs6000_emit_vector_select): Same.


Attachment: ifc2_fsf_mainline.5.0.diff
Description: Binary data




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