Commit f5d1572a by Saurabh Verma Committed by Ian Lance Taylor

simplify-rtx.c (simplify_binary_operation_1): Correct the condition for…

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
parent 852993e3
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> 2005-09-06 Keith Besaw <kbesaw@us.ibm.com>
* common.opt: Add option ftree-vect-loop-version. * common.opt: Add option ftree-vect-loop-version.
......
...@@ -1661,7 +1661,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, ...@@ -1661,7 +1661,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
&& ((INTVAL (trueop1) & GET_MODE_MASK (mode)) && ((INTVAL (trueop1) & GET_MODE_MASK (mode))
== GET_MODE_MASK (mode))) == GET_MODE_MASK (mode)))
return simplify_gen_unary (NOT, mode, op0, mode); return simplify_gen_unary (NOT, mode, op0, mode);
if (trueop0 == trueop1 if (rtx_equal_p (trueop0, trueop1)
&& ! side_effects_p (op0) && ! side_effects_p (op0)
&& GET_MODE_CLASS (mode) != MODE_CC) && GET_MODE_CLASS (mode) != MODE_CC)
return CONST0_RTX (mode); return CONST0_RTX (mode);
...@@ -1696,7 +1696,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode 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 && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& (nonzero_bits (trueop0, mode) & ~INTVAL (trueop1)) == 0) && (nonzero_bits (trueop0, mode) & ~INTVAL (trueop1)) == 0)
return op0; 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) && GET_MODE_CLASS (mode) != MODE_CC)
return op0; return op0;
/* A & (~A) -> 0 */ /* A & (~A) -> 0 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment