diff options
author | Falk Hueffner <falk@debian.org> | 2005-01-09 23:27:07 +0100 |
---|---|---|
committer | Falk Hueffner <falk@gcc.gnu.org> | 2005-01-09 23:27:07 +0100 |
commit | 351bae3d7df284c94babb81e1b5bb6142c5963a8 (patch) | |
tree | 0eff0abb5f43de962a26daa9fc08fb7f81a95145 /gcc/fold-const.c | |
parent | 7142ae779f48178dcdda1a76ba18aafa1a3940ca (diff) | |
download | gcc-351bae3d7df284c94babb81e1b5bb6142c5963a8.zip gcc-351bae3d7df284c94babb81e1b5bb6142c5963a8.tar.gz gcc-351bae3d7df284c94babb81e1b5bb6142c5963a8.tar.bz2 |
fold-const.c (fold): Also handle EXACT_DIV_EXPR when folding X/C1 cmpop C2.
* fold-const.c (fold): Also handle EXACT_DIV_EXPR when folding
X/C1 cmpop C2.
From-SVN: r93121
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 21ee14c..7ccd3a8 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)) |