aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2014-11-18 11:26:31 +0100
committerMarc Glisse <glisse@gcc.gnu.org>2014-11-18 10:26:31 +0000
commit092404511f58ed2a7c11785fa5b2e69b32048fd3 (patch)
treec1395e2804b0507497743d4f678303c275f80e85 /gcc/tree.h
parent9f37760abed226a27061ded75d50be803ef73a96 (diff)
downloadgcc-092404511f58ed2a7c11785fa5b2e69b32048fd3.zip
gcc-092404511f58ed2a7c11785fa5b2e69b32048fd3.tar.gz
gcc-092404511f58ed2a7c11785fa5b2e69b32048fd3.tar.bz2
tree.c (element_mode, [...]): New functions.
2014-11-18 Marc Glisse <marc.glisse@inria.fr> * tree.c (element_mode, integer_truep): New functions. * tree.h (element_mode, integer_truep): Declare them. * fold-const.c (negate_expr_p, fold_negate_expr, combine_comparisons, fold_cond_expr_with_comparison, fold_real_zero_addition_p, fold_comparison, fold_ternary_loc, tree_call_nonnegative_warnv_p, fold_strip_sign_ops): Use element_mode. (fold_binary_loc): Use element_mode and element_precision. * match.pd: Use integer_truep, element_mode, element_precision, VECTOR_TYPE_P and build_one_cst. Extend some transformations to vectors. Simplify A/-A. From-SVN: r217702
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 108b52d..ed8fecd 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1564,6 +1564,8 @@ extern void protected_set_expr_location (tree, location_t);
#define SET_TYPE_MODE(NODE, MODE) \
(TYPE_CHECK (NODE)->type_common.mode = (MODE))
+extern machine_mode element_mode (const_tree t);
+
/* The "canonical" type for this type node, which is used by frontends to
compare the type for equality with another type. If two types are
equal (based on the semantics of the language), then they will have
@@ -3999,6 +4001,11 @@ extern int integer_pow2p (const_tree);
extern int integer_nonzerop (const_tree);
+/* integer_truep (tree x) is nonzero if X is an integer constant of value 1 or
+ a vector where each element is an integer constant of value -1. */
+
+extern int integer_truep (const_tree);
+
extern bool cst_and_fits_in_hwi (const_tree);
extern tree num_ending_zeros (const_tree);