Commit 7e0c3f57 by Ian Lance Taylor Committed by Ian Lance Taylor

lower-subreg.c (simple_move_operand): Reject CONST.

	* lower-subreg.c (simple_move_operand): Reject CONST.
	(resolve_clobber): Call validate_change rather than directly
	assigning to XEXP (pat, 0).

From-SVN: r121652
parent 44fb8659
2007-02-06 Ian Lance Taylor <iant@google.com>
* lower-subreg.c (simple_move_operand): Reject CONST.
(resolve_clobber): Call validate_change rather than directly
assigning to XEXP (pat, 0).
2006-02-06 Paolo Bonzini <bonzini@gnu.org> 2006-02-06 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (tree-ssa-loop-ivopts.o): Add pointer-set.h dependency. * Makefile.in (tree-ssa-loop-ivopts.o): Add pointer-set.h dependency.
......
...@@ -80,7 +80,8 @@ simple_move_operand (rtx x) ...@@ -80,7 +80,8 @@ simple_move_operand (rtx x)
if (GET_CODE (x) == LABEL_REF if (GET_CODE (x) == LABEL_REF
|| GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == SYMBOL_REF
|| GET_CODE (x) == HIGH) || GET_CODE (x) == HIGH
|| GET_CODE (x) == CONST)
return false; return false;
if (MEM_P (x) if (MEM_P (x)
...@@ -832,6 +833,7 @@ resolve_clobber (rtx pat, rtx insn) ...@@ -832,6 +833,7 @@ resolve_clobber (rtx pat, rtx insn)
rtx reg; rtx reg;
enum machine_mode orig_mode; enum machine_mode orig_mode;
unsigned int words, i; unsigned int words, i;
int ret;
reg = XEXP (pat, 0); reg = XEXP (pat, 0);
if (!resolve_reg_p (reg) && !resolve_subreg_p (reg)) if (!resolve_reg_p (reg) && !resolve_subreg_p (reg))
...@@ -841,7 +843,12 @@ resolve_clobber (rtx pat, rtx insn) ...@@ -841,7 +843,12 @@ resolve_clobber (rtx pat, rtx insn)
words = GET_MODE_SIZE (orig_mode); words = GET_MODE_SIZE (orig_mode);
words = (words + UNITS_PER_WORD - 1) / UNITS_PER_WORD; words = (words + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
XEXP (pat, 0) = simplify_gen_subreg_concatn (word_mode, reg, orig_mode, 0); ret = validate_change (NULL_RTX, &XEXP (pat, 0),
simplify_gen_subreg_concatn (word_mode, reg,
orig_mode, 0),
0);
gcc_assert (ret != 0);
for (i = words - 1; i > 0; --i) for (i = words - 1; i > 0; --i)
{ {
rtx x; rtx x;
......
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