diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-03 15:13:26 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-03 15:13:26 +0000 |
| commit | 6cf89e0496c6011f63a9bc1f9a37e09274f1f6ab (patch) | |
| tree | f49377e311033773555fb0a2471ab04986fefafe /gcc/expr.c | |
| parent | 9adacac79c8a02257d837ad96e3428e9d0222c06 (diff) | |
| download | ppe42-gcc-6cf89e0496c6011f63a9bc1f9a37e09274f1f6ab.tar.gz ppe42-gcc-6cf89e0496c6011f63a9bc1f9a37e09274f1f6ab.zip | |
Vector shuffling patch from Artem Shinkarov.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
| -rw-r--r-- | gcc/expr.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 97edd460019..d1807b0acc1 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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 |

