summaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2016-05-20 09:17:16 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-05-20 09:17:16 +0000
commit483c642948802336899b14fa57b2e76c760c3c36 (patch)
treee061dbe5dac8633c8babd3bf14639f9e128c156e /gcc/tree.def
parenteb066284cb8cdf7f46f455c3e975cf1b349a0487 (diff)
re PR target/29756 (SSE intrinsics hard to use without redundant temporaries appearing)
2016-05-20 Richard Guenther <rguenther@suse.de> PR tree-optimization/29756 * tree.def (BIT_INSERT_EXPR): New tcc_expression tree code. * expr.c (expand_expr_real_2): Handle BIT_INSERT_EXPR. * fold-const.c (operand_equal_p): Likewise. (fold_ternary_loc): Add constant folding of BIT_INSERT_EXPR. * gimplify.c (gimplify_expr): Handle BIT_INSERT_EXPR. * tree-inline.c (estimate_operator_cost): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * gimple-pretty-print.c (dump_ternary_rhs): Likewise. * gimple.c (get_gimple_rhs_num_ops): Handle BIT_INSERT_EXPR. * tree-cfg.c (verify_gimple_assign_ternary): Verify BIT_INSERT_EXPR. * tree-ssa.c (non_rewritable_lvalue_p): We can rewrite vector inserts using BIT_FIELD_REF or MEM_REF on the lhs. (execute_update_addresses_taken): Do it. * gcc.dg/tree-ssa/vector-6.c: New testcase. From-SVN: r236501
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index 44130d7c77f..d16575aee62 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -852,6 +852,21 @@ DEFTREECODE (ADDR_EXPR, "addr_expr", tcc_expression, 1)
descriptor of type ptr_mode. */
DEFTREECODE (FDESC_EXPR, "fdesc_expr", tcc_expression, 2)
+/* Given a container value, a replacement value and a bit position within
+ the container, produce the value that results from replacing the part of
+ the container starting at the bit position with the replacement value.
+ Operand 0 is a tree for the container value of integral or vector type;
+ Operand 1 is a tree for the replacement value of another integral or
+ the vector element type;
+ Operand 2 is a tree giving the constant bit position;
+ The number of bits replaced is given by the precision of the type of the
+ replacement value if it is integral or by its size if it is non-integral.
+ ??? The reason to make the size of the replacement implicit is to avoid
+ introducing a quaternary operation.
+ The replaced bits shall be fully inside the container. If the container
+ is of vector type, then these bits shall be aligned with its elements. */
+DEFTREECODE (BIT_INSERT_EXPR, "bit_field_insert", tcc_expression, 3)
+
/* Given two real or integer operands of the same type,
returns a complex value of the corresponding complex type. */
DEFTREECODE (COMPLEX_EXPR, "complex_expr", tcc_binary, 2)