diff options
author | Artjoms Sinkarovs <artyom.shinkaroff@gmail.com> | 2011-10-03 08:13:26 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-10-03 08:13:26 -0700 |
commit | f90e8e2eae9a83d22efd7922673116a97ebf5290 (patch) | |
tree | f49377e311033773555fb0a2471ab04986fefafe /gcc/expr.c | |
parent | e4a5b262e7bc64b22a34ada24b5d83b6c13dbe40 (diff) | |
download | gcc-f90e8e2eae9a83d22efd7922673116a97ebf5290.zip gcc-f90e8e2eae9a83d22efd7922673116a97ebf5290.tar.gz gcc-f90e8e2eae9a83d22efd7922673116a97ebf5290.tar.bz2 |
Vector shuffling patch from Artem Shinkarov.
From-SVN: r179462
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -8605,6 +8605,10 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, case VEC_PACK_FIX_TRUNC_EXPR: mode = TYPE_MODE (TREE_TYPE (treeop0)); goto binop; + + case VEC_SHUFFLE_EXPR: + target = expand_vec_shuffle_expr (type, treeop0, treeop1, treeop2, target); + return target; case DOT_PROD_EXPR: { @@ -10308,6 +10312,17 @@ do_store_flag (sepops ops, rtx target, enum machine_mode mode) STRIP_NOPS (arg0); STRIP_NOPS (arg1); + + /* For vector typed comparisons emit code to generate the desired + all-ones or all-zeros mask. Conveniently use the VEC_COND_EXPR + expander for this. */ + if (TREE_CODE (ops->type) == VECTOR_TYPE) + { + tree ifexp = build2 (ops->code, ops->type, arg0, arg1); + tree if_true = constant_boolean_node (true, ops->type); + tree if_false = constant_boolean_node (false, ops->type); + return expand_vec_cond_expr (ops->type, ifexp, if_true, if_false, target); + } /* For vector typed comparisons emit code to generate the desired all-ones or all-zeros mask. Conveniently use the VEC_COND_EXPR |