aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorDorit Nuzman <dorit@il.ibm.com>2005-06-21 09:02:00 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2005-06-21 09:02:00 +0000
commita6b46ba2c84f81e70811e13581c99350cdc76400 (patch)
tree9b2edf4d87ca9a2741f8f8a846bf5e277d74ab28 /gcc/optabs.h
parenta3a2067ac5b2a5ce0b8439d42167df5694d2bb5b (diff)
downloadgcc-a6b46ba2c84f81e70811e13581c99350cdc76400.zip
gcc-a6b46ba2c84f81e70811e13581c99350cdc76400.tar.gz
gcc-a6b46ba2c84f81e70811e13581c99350cdc76400.tar.bz2
genopinit.c (vec_shl_optab, [...]): Initialize new optabs.
* genopinit.c (vec_shl_optab, vec_shr_optab): Initialize new optabs. (reduc_plus_optab): Removed. Replcaed with... (reduc_splus_optab, reduc_uplus_optab): Initialize new optabs. * optabs.c (optab_for_tree_code): Return reduc_splus_optab or reduc_uplus_optab instead of reduc_plus_optab. (expand_vec_shift_expr): New function. (init_optabs): Initialize new optabs. Remove initialization of reduc_plus_optab. (optab_for_tree_code): Return vec_shl_optab/vec_shr_optab for VEC_LSHIFT_EXPR/VEC_RSHIFT_EXPR. * optabs.h (OTI_reduc_plus): Removed. Replaced with... (OTI_reduc_splus, OTI_reduc_uplus): New. (reduc_plus_optab): Removed. Replcaed with... (reduc_splus_optab, reduc_uplus_optab): New optabs. (vec_shl_optab, vec_shr_optab): New optabs. (expand_vec_shift_expr): New function declaration. * tree.def (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Handle new tree-codes. * expr.c (expand_expr_real_1): Handle new tree-codes. * tree-pretty-print.c (dump_generic_node, op_symbol, op_prio): Likewise. * tree-vect-generic.c (expand_vector_operations_1): Add assert. * tree-vect-transform.c (vect_create_epilog_for_reduction): Add two alternatives for generating reduction epilog code. (vectorizable_reduction): Don't fail of direct reduction support is not available. (vectorizable_target_reduction_pattern): Likewise. * config/rs6000/altivec.md (reduc_smax_v4si, reduc_smax_v4sf, reduc_umax_v4si, reduc_smin_v4si, reduc_smin_v4sf, reduc_umin_v4si, reduc_plus_v4si, reduc_plus_v4sf): Removed. (vec_shl_<mode>, vec_shr_<mode>, altivec_vsumsws_nomode, reduc_splus_<mode>, reduc_uplus_v16qi): New. From-SVN: r101231
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 2495fed..91afce3 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -236,7 +236,8 @@ enum optab_index
OTI_reduc_umax,
OTI_reduc_smin,
OTI_reduc_umin,
- OTI_reduc_plus,
+ OTI_reduc_splus,
+ OTI_reduc_uplus,
/* Set specified field of vector operand. */
OTI_vec_set,
@@ -244,6 +245,9 @@ enum optab_index
OTI_vec_extract,
/* Initialize vector operand. */
OTI_vec_init,
+ /* Whole vector shift. The shift amount is in bits. */
+ OTI_vec_shl,
+ OTI_vec_shr,
/* Extract specified elements from vectors, for vector load. */
OTI_vec_realign_load,
@@ -358,11 +362,14 @@ extern GTY(()) optab optab_table[OTI_MAX];
#define reduc_umax_optab (optab_table[OTI_reduc_umax])
#define reduc_smin_optab (optab_table[OTI_reduc_smin])
#define reduc_umin_optab (optab_table[OTI_reduc_umin])
-#define reduc_plus_optab (optab_table[OTI_reduc_plus])
+#define reduc_splus_optab (optab_table[OTI_reduc_splus])
+#define reduc_uplus_optab (optab_table[OTI_reduc_uplus])
#define vec_set_optab (optab_table[OTI_vec_set])
#define vec_extract_optab (optab_table[OTI_vec_extract])
#define vec_init_optab (optab_table[OTI_vec_init])
+#define vec_shl_optab (optab_table[OTI_vec_shl])
+#define vec_shr_optab (optab_table[OTI_vec_shr])
#define vec_realign_load_optab (optab_table[OTI_vec_realign_load])
#define powi_optab (optab_table[OTI_powi])
@@ -575,4 +582,7 @@ bool expand_vec_cond_expr_p (tree, enum machine_mode);
/* Generate code for VEC_COND_EXPR. */
extern rtx expand_vec_cond_expr (tree, rtx);
+/* Generate code for VEC_LSHIFT_EXPR and VEC_RSHIFT_EXPR. */
+extern rtx expand_vec_shift_expr (tree, rtx);
+
#endif /* GCC_OPTABS_H */