Commit 6e814b8d by Kazu Hirata Committed by Kazu Hirata

combine.c (make_field_assignment): Remove unnecessary AND when storing into zero_extract.

	* combine.c (make_field_assignment): Remove unnecessary AND
	when storing into zero_extract.

From-SVN: r64674
parent 91f07c9b
2003-03-21 Kazu Hirata <kazu@cs.umass.edu>
* combine.c (make_field_assignment): Remove unnecessary AND
when storing into zero_extract.
2003-03-21 Zack Weinberg <zack@codesourcery.com>
* aclocal.m4 (gcc_AC_EXAMINE_OBJECT, gcc_AC_C_FLOAT_FORMAT): Delete.
......
......@@ -7923,6 +7923,17 @@ make_field_assignment (x)
: ((unsigned HOST_WIDE_INT) 1 << len) - 1,
dest, 0);
/* If SRC is masked by an AND that does not make a difference in
the value being stored, strip it. */
if (GET_CODE (assign) == ZERO_EXTRACT
&& GET_CODE (XEXP (assign, 1)) == CONST_INT
&& INTVAL (XEXP (assign, 1)) < HOST_BITS_PER_WIDE_INT
&& GET_CODE (src) == AND
&& GET_CODE (XEXP (src, 1)) == CONST_INT
&& (INTVAL (XEXP (src, 1))
== ((unsigned HOST_WIDE_INT) 1 << INTVAL (XEXP (assign, 1))) - 1))
src = XEXP (src, 0);
return gen_rtx_SET (VOIDmode, assign, src);
}
......
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