expmed.c (store_fixed_bit_field): If we're not optimizing for size...

* expmed.c (store_fixed_bit_field): If we're not optimizing for
	size, force the intermediate into a new pseudo rather instead of
	performing both a bitwise AND and a bitwise IOR in memory.

From-SVN: r113318
This commit is contained in:
Roger Sayle 2006-04-27 17:26:03 +00:00 committed by Roger Sayle
parent 921b02cd1f
commit 135c2bd408
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-04-27 Roger Sayle <roger@eyesopen.com>
* expmed.c (store_fixed_bit_field): If we're not optimizing for
size, force the intermediate into a new pseudo rather instead of
performing both a bitwise AND and a bitwise IOR in memory.
2006-04-27 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/26685

View File

@ -924,7 +924,12 @@ store_fixed_bit_field (rtx op0, unsigned HOST_WIDE_INT offset,
if (! all_one)
{
temp = expand_binop (mode, and_optab, op0,
/* Don't try and keep the intermediate in memory, if we need to
perform both a bit-wise AND and a bit-wise IOR (except when
we're optimizing for size). */
if (MEM_P (subtarget) && !all_zero && !optimize_size)
subtarget = force_reg (mode, subtarget);
temp = expand_binop (mode, and_optab, subtarget,
mask_rtx (mode, bitpos, bitsize, 1),
subtarget, 1, OPTAB_LIB_WIDEN);
subtarget = temp;