aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-01-27 19:23:36 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-01-27 19:23:36 -0500
commit02b8f300778a237a186120fd70b0821cebc7ca7d (patch)
tree8e8fb5c1205644b4fbea4eb25802d6a16c38c1d6
parentc2615a67c76b0f94c16ab8c872a7132995ee3219 (diff)
downloadgcc-02b8f300778a237a186120fd70b0821cebc7ca7d.zip
gcc-02b8f300778a237a186120fd70b0821cebc7ca7d.tar.gz
gcc-02b8f300778a237a186120fd70b0821cebc7ca7d.tar.bz2
(simplify_relation_operation): We can compute the result of a comparison of...
(simplify_relation_operation): We can compute the result of a comparison of CONST_INTs no matter what mode the computation is to be done in. From-SVN: r3372
-rw-r--r--gcc/cse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index dd0c0e2..4249af6 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -4051,8 +4051,12 @@ simplify_relational_operation (code, mode, op0, op1)
if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
op1 = XEXP (op0, 1), op0 = XEXP (op0, 0);
- if (GET_CODE (op0) != CONST_INT || GET_CODE (op1) != CONST_INT
- || width > HOST_BITS_PER_WIDE_INT || width == 0)
+ /* Unlike the arithmetic operations, we can do the comparison whether
+ or not WIDTH is larger than HOST_BITS_PER_WIDE_INT because the
+ CONST_INTs are to be understood as being infinite precision as
+ is the comparison. So there is no question of overflow. */
+
+ if (GET_CODE (op0) != CONST_INT || GET_CODE (op1) != CONST_INT || width == 0)
{
/* Even if we can't compute a constant result,
there are some cases worth simplifying. */