diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-28 05:04:48 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-28 05:04:48 +0000 |
commit | 426a138f1f231a55f4670be9c4bca30dbb0e3b61 (patch) | |
tree | d5119687bedfd7a7f56d6218696508ae430f8416 /gcc/tree-data-ref.c | |
parent | 6117e4152254104e118e366d56afdfcc83e2b473 (diff) | |
download | gcc-426a138f1f231a55f4670be9c4bca30dbb0e3b61.tar.gz |
* tree.c (tree_fold_gcd): Delete.
* tree.h (tree_fold_gcd): Remove prototype.
* tree-data-ref.c (tree_fold_divides_p): Don't use tree_fold_gcd to
test whether one constant integer is a multiple of another. Instead
call int_const_binop with TRUNC_MOD_EXPR and test for a zero result.
* fold-const.c (multiple_of_p): We've determined both TOP and
BOTTOM are integer constants so we can call int_const_binop directly
instead of the more generic const_binop.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121253 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 2da59db43ff..d6201b6cf60 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -561,11 +561,11 @@ base_addr_differ_p (struct data_reference *dra, /* Returns true iff A divides B. */ static inline bool -tree_fold_divides_p (tree a, - tree b) +tree_fold_divides_p (tree a, tree b) { - /* Determines whether (A == gcd (A, B)). */ - return tree_int_cst_equal (a, tree_fold_gcd (a, b)); + gcc_assert (TREE_CODE (a) == INTEGER_CST); + gcc_assert (TREE_CODE (b) == INTEGER_CST); + return integer_zerop (int_const_binop (TRUNC_MOD_EXPR, b, a, 0)); } /* Returns true iff A divides B. */ |