Commit f8eacd97 by Roger Sayle Committed by Roger Sayle

simplify-rtx.c (simplify_relational_operation_1): Avoid creating zero extensions…

simplify-rtx.c (simplify_relational_operation_1): Avoid creating zero extensions of BImode operands.


	* simplify-rtx.c (simplify_relational_operation_1): Avoid creating
	zero extensions of BImode operands.  Call lowpart_subreg instead
	of gen_lowpart_common and gen_lowpart_SUBREG.

From-SVN: r94730
parent 6a8c830d
2005-02-07 Roger Sayle <roger@eyesopen.com>
* simplify-rtx.c (simplify_relational_operation_1): Avoid creating
zero extensions of BImode operands. Call lowpart_subreg instead
of gen_lowpart_common and gen_lowpart_SUBREG.
2005-02-07 Nathanael Nerode <neroden@gcc.gnu.org> 2005-02-07 Nathanael Nerode <neroden@gcc.gnu.org>
PR ada/19489 PR ada/19489
......
...@@ -2886,19 +2886,12 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode, ...@@ -2886,19 +2886,12 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode,
&& op1 == const0_rtx && op1 == const0_rtx
&& GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_CLASS (mode) == MODE_INT
&& cmp_mode != VOIDmode && cmp_mode != VOIDmode
&& cmp_mode != BImode
&& nonzero_bits (op0, cmp_mode) == 1 && nonzero_bits (op0, cmp_mode) == 1
&& STORE_FLAG_VALUE == 1) && STORE_FLAG_VALUE == 1)
{ return GET_MODE_SIZE (mode) > GET_MODE_SIZE (cmp_mode)
rtx tmp; ? simplify_gen_unary (ZERO_EXTEND, mode, op0, cmp_mode)
if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (cmp_mode)) : lowpart_subreg (mode, op0, cmp_mode);
return simplify_gen_unary (ZERO_EXTEND, mode, op0, cmp_mode);
tmp = gen_lowpart_common (mode, op0);
if (tmp)
return tmp;
if (GET_MODE (op0) != mode)
return gen_lowpart_SUBREG (mode, op0);
return op0;
}
return NULL_RTX; return NULL_RTX;
} }
......
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