From f564e6eb34c3bde114309c0d3ee3b6cd38f12376 Mon Sep 17 00:00:00 2001 From: falk Date: Sun, 9 Jan 2005 22:27:07 +0000 Subject: [PATCH] * fold-const.c (fold): Also handle EXACT_DIV_EXPR when folding X/C1 cmpop C2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93121 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/fold-const.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e26229f441a..3f57b962ae6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-01-09 Falk Hueffner + + * fold-const.c (fold): Also handle EXACT_DIV_EXPR when folding + X/C1 cmpop C2. + 2005-01-09 David Edelsohn PR target/18720 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 21ee14cc563..7ccd3a895a8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8965,7 +8965,8 @@ fold (tree expr) /* We can fold X/C1 op C2 where C1 and C2 are integer constants into a single range test. */ - if (TREE_CODE (arg0) == TRUNC_DIV_EXPR + if ((TREE_CODE (arg0) == TRUNC_DIV_EXPR + || TREE_CODE (arg0) == EXACT_DIV_EXPR) && TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST && !integer_zerop (TREE_OPERAND (arg0, 1)) -- 2.11.0