[PATCH] RS6000 : Add support for vector conditionals

Devang Patel dpatel@apple.com
Fri Oct 1 00:46:00 GMT 2004


On Sep 16, 2004, at 9:54 AM, Devang Patel wrote:

> 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.
>

This is updated patch to accommodate changes made in earlier 
vcond_gen_code patch.
Bootstrapped and tested vector test cases on powerpc-darwin  (along 
with other two vectorization patches, already posted earlier on this 
list). Full regression test run is in progress. OK if it succeeds ?

Thanks,
-
Devang

2004-09-29  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, UNSPEC_VCONDU_V4SI, UNSPEC_VCONDU_V8HI,
         UNSPEC_VCONDU_V16QI): New constant defines.
         (vcondv4si, vcondv4sf, vcondv8hi, vcondv16qi, vconduv4si, 
vconduv8hi,
         vconduv16qi): 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.
         (INSN_NOT_AVAILABLE): New

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifc2_fsf_mainline.5.1.diff
Type: application/octet-stream
Size: 27474 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041001/d5ae31c1/attachment.obj>


More information about the Gcc-patches mailing list