re PR middle-end/41268 (bootstrap is broken after r151350 (expand from tuples))

PR middle-end/41268
	* cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
	SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
	* rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
	to reflect reality.

From-SVN: r151544
This commit is contained in:
Michael Matz 2009-09-09 00:43:36 +00:00 committed by Michael Matz
parent 5fb455bc70
commit 4e18a7d41d
3 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,11 @@
2009-09-09 Michael Matz <matz@suse.de>
PR middle-end/41268
* cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
* rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
to reflect reality.
2009-09-08 DJ Delorie <dj@redhat.com>
* config/mep/mep.c (conversions[]): Add "ml" pattern.

View File

@ -1920,19 +1920,19 @@ expand_gimple_stmt_1 (gimple stmt)
;
else if (promoted)
{
bool unsigndp = SUBREG_PROMOTED_UNSIGNED_P (target);
int unsignedp = SUBREG_PROMOTED_UNSIGNED_P (target);
/* If TEMP is a VOIDmode constant, use convert_modes to make
sure that we properly convert it. */
if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode)
{
temp = convert_modes (GET_MODE (target),
TYPE_MODE (ops.type),
temp, unsigndp);
temp, unsignedp);
temp = convert_modes (GET_MODE (SUBREG_REG (target)),
GET_MODE (target), temp, unsigndp);
GET_MODE (target), temp, unsignedp);
}
convert_move (SUBREG_REG (target), temp, unsigndp);
convert_move (SUBREG_REG (target), temp, unsignedp);
}
else if (nontemporal && emit_storent_insn (target, temp))
;

View File

@ -255,8 +255,7 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"),
ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P. */
unsigned int call : 1;
/* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere.
1 in a SUBREG if it references an unsigned object whose mode has been
from a promoted to a wider mode.
1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
1 in a SYMBOL_REF if it addresses something in the per-function
constants pool.
1 in a CALL_INSN logically equivalent to ECF_CONST and TREE_READONLY.
@ -268,7 +267,7 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"),
if it has been deleted.
1 in a REG expression if corresponds to a variable declared by the user,
0 for an internally generated temporary.
1 in a SUBREG with a negative value.
1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
1 in a LABEL_REF, REG_LABEL_TARGET or REG_LABEL_OPERAND note for a
non-local label.
In a SYMBOL_REF, this flag is used for machine-specific purposes.
@ -1161,6 +1160,15 @@ do { \
_rtx->unchanging = (VAL); \
} \
} while (0)
/* Valid for subregs which are SUBREG_PROMOTED_VAR_P(). In that case
this gives the necessary extensions:
0 - signed
1 - normal unsigned
-1 - pointer unsigned, which most often can be handled like unsigned
extension, except for generating instructions where we need to
emit special code (ptr_extend insns) on some architectures. */
#define SUBREG_PROMOTED_UNSIGNED_P(RTX) \
((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \
? -1 : (int) (RTX)->unchanging)