Commit d18090b5 by Richard Sandiford Committed by Richard Sandiford

re PR target/55204 (ICE: in extract_insn, at recog.c:2140 (unrecognizable insn)…

re PR target/55204 (ICE: in extract_insn, at recog.c:2140 (unrecognizable insn) with -O --param loop-invariant-max-bbs-in-loop=0)

gcc/
	PR target/55204
	* config/i386/i386.c (ix86_address_subreg_operand): Remove stack
	pointer check.
	(print_reg): Use true_regnum rather than REGNO.
	(ix86_print_operand_address): Remove SUBREG handling.

From-SVN: r193178
parent 1bc60b18
2012-11-05 Richard Sandiford <rdsandiford@googlemail.com>
PR target/55204
* config/i386/i386.c (ix86_address_subreg_operand): Remove stack
pointer check.
(print_reg): Use true_regnum rather than REGNO.
(ix86_print_operand_address): Remove SUBREG handling.
2012-11-05 Jan Hubicka <jh@suse.cz> 2012-11-05 Jan Hubicka <jh@suse.cz>
* tree-ssa-loop-niter.c (finite_loop_p): Revamp to be just wrapper of * tree-ssa-loop-niter.c (finite_loop_p): Revamp to be just wrapper of
...@@ -11784,10 +11784,6 @@ ix86_address_subreg_operand (rtx op) ...@@ -11784,10 +11784,6 @@ ix86_address_subreg_operand (rtx op)
if (GET_MODE_SIZE (mode) > UNITS_PER_WORD) if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
return false; return false;
/* simplify_subreg does not handle stack pointer. */
if (REGNO (op) == STACK_POINTER_REGNUM)
return false;
/* Allow only SUBREGs of non-eliminable hard registers. */ /* Allow only SUBREGs of non-eliminable hard registers. */
return register_no_elim_operand (op, mode); return register_no_elim_operand (op, mode);
} }
...@@ -14082,15 +14078,9 @@ void ...@@ -14082,15 +14078,9 @@ void
print_reg (rtx x, int code, FILE *file) print_reg (rtx x, int code, FILE *file)
{ {
const char *reg; const char *reg;
unsigned int regno;
bool duplicated = code == 'd' && TARGET_AVX; bool duplicated = code == 'd' && TARGET_AVX;
gcc_assert (x == pc_rtx
|| (REGNO (x) != ARG_POINTER_REGNUM
&& REGNO (x) != FRAME_POINTER_REGNUM
&& REGNO (x) != FLAGS_REG
&& REGNO (x) != FPSR_REG
&& REGNO (x) != FPCR_REG));
if (ASSEMBLER_DIALECT == ASM_ATT) if (ASSEMBLER_DIALECT == ASM_ATT)
putc ('%', file); putc ('%', file);
...@@ -14101,6 +14091,13 @@ print_reg (rtx x, int code, FILE *file) ...@@ -14101,6 +14091,13 @@ print_reg (rtx x, int code, FILE *file)
return; return;
} }
regno = true_regnum (x);
gcc_assert (regno != ARG_POINTER_REGNUM
&& regno != FRAME_POINTER_REGNUM
&& regno != FLAGS_REG
&& regno != FPSR_REG
&& regno != FPCR_REG);
if (code == 'w' || MMX_REG_P (x)) if (code == 'w' || MMX_REG_P (x))
code = 2; code = 2;
else if (code == 'b') else if (code == 'b')
...@@ -14126,7 +14123,7 @@ print_reg (rtx x, int code, FILE *file) ...@@ -14126,7 +14123,7 @@ print_reg (rtx x, int code, FILE *file)
{ {
gcc_assert (TARGET_64BIT); gcc_assert (TARGET_64BIT);
putc ('r', file); putc ('r', file);
fprint_ul (file, REGNO (x) - FIRST_REX_INT_REG + 8); fprint_ul (file, regno - FIRST_REX_INT_REG + 8);
switch (code) switch (code)
{ {
case 0: case 0:
...@@ -14170,24 +14167,24 @@ print_reg (rtx x, int code, FILE *file) ...@@ -14170,24 +14167,24 @@ print_reg (rtx x, int code, FILE *file)
case 16: case 16:
case 2: case 2:
normal: normal:
reg = hi_reg_name[REGNO (x)]; reg = hi_reg_name[regno];
break; break;
case 1: case 1:
if (REGNO (x) >= ARRAY_SIZE (qi_reg_name)) if (regno >= ARRAY_SIZE (qi_reg_name))
goto normal; goto normal;
reg = qi_reg_name[REGNO (x)]; reg = qi_reg_name[regno];
break; break;
case 0: case 0:
if (REGNO (x) >= ARRAY_SIZE (qi_high_reg_name)) if (regno >= ARRAY_SIZE (qi_high_reg_name))
goto normal; goto normal;
reg = qi_high_reg_name[REGNO (x)]; reg = qi_high_reg_name[regno];
break; break;
case 32: case 32:
if (SSE_REG_P (x)) if (SSE_REG_P (x))
{ {
gcc_assert (!duplicated); gcc_assert (!duplicated);
putc ('y', file); putc ('y', file);
fputs (hi_reg_name[REGNO (x)] + 1, file); fputs (hi_reg_name[regno] + 1, file);
return; return;
} }
break; break;
...@@ -14943,22 +14940,6 @@ ix86_print_operand_address (FILE *file, rtx addr) ...@@ -14943,22 +14940,6 @@ ix86_print_operand_address (FILE *file, rtx addr)
gcc_assert (ok); gcc_assert (ok);
if (parts.base && GET_CODE (parts.base) == SUBREG)
{
rtx tmp = SUBREG_REG (parts.base);
parts.base = simplify_subreg (GET_MODE (parts.base),
tmp, GET_MODE (tmp), 0);
gcc_assert (parts.base != NULL_RTX);
}
if (parts.index && GET_CODE (parts.index) == SUBREG)
{
rtx tmp = SUBREG_REG (parts.index);
parts.index = simplify_subreg (GET_MODE (parts.index),
tmp, GET_MODE (tmp), 0);
gcc_assert (parts.index != NULL_RTX);
}
base = parts.base; base = parts.base;
index = parts.index; index = parts.index;
disp = parts.disp; disp = parts.disp;
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