Generate "xor reg, reg" if optimizing for size

PR target/60863
	* config/i386/i386.c (ix86_expand_clear): Remove outdated
	comment.  Check optimize_insn_for_size_p instead of
	optimize_insn_for_speed_p.

From-SVN: r209488
This commit is contained in:
H.J. Lu 2014-04-17 15:19:34 +00:00 committed by H.J. Lu
parent 104cb50bd1
commit 40ed344a3c
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2014-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR target/60863
* config/i386/i386.c (ix86_expand_clear): Remove outdated
comment. Check optimize_insn_for_size_p instead of
optimize_insn_for_speed_p.
2014-04-17 Martin Jambor <mjambor@suse.cz>
* gimple-iterator.c (gsi_start_edge): New function.

View File

@ -16668,8 +16668,7 @@ ix86_expand_clear (rtx dest)
dest = gen_rtx_REG (SImode, REGNO (dest));
tmp = gen_rtx_SET (VOIDmode, dest, const0_rtx);
/* This predicate should match that for movsi_xor and movdi_xor_rex64. */
if (!TARGET_USE_MOV0 || optimize_insn_for_speed_p ())
if (!TARGET_USE_MOV0 || optimize_insn_for_size_p ())
{
rtx clob = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, FLAGS_REG));
tmp = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, tmp, clob));