aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSaurabh Verma <saurabh.verma@codito.com>2005-09-06 17:51:48 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2005-09-06 17:51:48 +0000
commitf5d1572a8a1aaba31679c2500e4a492936960531 (patch)
tree54a662f240d5b2a941c2dad15296e474258a6a4e /gcc
parent852993e3817924f37fdfa9d8c6b191cb30934cfb (diff)
downloadgcc-f5d1572a8a1aaba31679c2500e4a492936960531.zip
gcc-f5d1572a8a1aaba31679c2500e4a492936960531.tar.gz
gcc-f5d1572a8a1aaba31679c2500e4a492936960531.tar.bz2
simplify-rtx.c (simplify_binary_operation_1): Correct the condition for detecting cases like (a&a) and (a^a).
* simplify-rtx.c (simplify_binary_operation_1): Correct the condition for detecting cases like (a&a) and (a^a). From-SVN: r103955
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/simplify-rtx.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 310d84a..a26af5a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-06 Saurabh Verma <saurabh.verma@codito.com>
+
+ * simplify-rtx.c (simplify_binary_operation_1): Correct the
+ condition for detecting cases like (a&a) and (a^a).
+
2005-09-06 Keith Besaw <kbesaw@us.ibm.com>
* common.opt: Add option ftree-vect-loop-version.
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index d3ec956..1b99677 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1661,7 +1661,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
&& ((INTVAL (trueop1) & GET_MODE_MASK (mode))
== GET_MODE_MASK (mode)))
return simplify_gen_unary (NOT, mode, op0, mode);
- if (trueop0 == trueop1
+ if (rtx_equal_p (trueop0, trueop1)
&& ! side_effects_p (op0)
&& GET_MODE_CLASS (mode) != MODE_CC)
return CONST0_RTX (mode);
@@ -1696,7 +1696,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
&& GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& (nonzero_bits (trueop0, mode) & ~INTVAL (trueop1)) == 0)
return op0;
- if (trueop0 == trueop1 && ! side_effects_p (op0)
+ if (rtx_equal_p (trueop0, trueop1) && ! side_effects_p (op0)
&& GET_MODE_CLASS (mode) != MODE_CC)
return op0;
/* A & (~A) -> 0 */