aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2012-11-05 18:51:33 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2012-11-05 18:51:33 +0000
commitd18090b591e73fc685822915d9e3c3988fbb6c56 (patch)
tree372465ce35ee5a7b8d7a6bedfe432dda8aca86c2
parent1bc60b1814a5f0d09a54dbc2b996ceed2d93a89c (diff)
downloadgcc-d18090b591e73fc685822915d9e3c3988fbb6c56.zip
gcc-d18090b591e73fc685822915d9e3c3988fbb6c56.tar.gz
gcc-d18090b591e73fc685822915d9e3c3988fbb6c56.tar.bz2
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
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.c49
2 files changed, 23 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 026d62f..b0c4fd1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+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>
* tree-ssa-loop-niter.c (finite_loop_p): Revamp to be just wrapper of
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 833ef5c..2066b89 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11784,10 +11784,6 @@ ix86_address_subreg_operand (rtx op)
if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
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. */
return register_no_elim_operand (op, mode);
}
@@ -14082,15 +14078,9 @@ void
print_reg (rtx x, int code, FILE *file)
{
const char *reg;
+ unsigned int regno;
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)
putc ('%', file);
@@ -14101,6 +14091,13 @@ print_reg (rtx x, int code, FILE *file)
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))
code = 2;
else if (code == 'b')
@@ -14126,7 +14123,7 @@ print_reg (rtx x, int code, FILE *file)
{
gcc_assert (TARGET_64BIT);
putc ('r', file);
- fprint_ul (file, REGNO (x) - FIRST_REX_INT_REG + 8);
+ fprint_ul (file, regno - FIRST_REX_INT_REG + 8);
switch (code)
{
case 0:
@@ -14170,24 +14167,24 @@ print_reg (rtx x, int code, FILE *file)
case 16:
case 2:
normal:
- reg = hi_reg_name[REGNO (x)];
+ reg = hi_reg_name[regno];
break;
case 1:
- if (REGNO (x) >= ARRAY_SIZE (qi_reg_name))
+ if (regno >= ARRAY_SIZE (qi_reg_name))
goto normal;
- reg = qi_reg_name[REGNO (x)];
+ reg = qi_reg_name[regno];
break;
case 0:
- if (REGNO (x) >= ARRAY_SIZE (qi_high_reg_name))
+ if (regno >= ARRAY_SIZE (qi_high_reg_name))
goto normal;
- reg = qi_high_reg_name[REGNO (x)];
+ reg = qi_high_reg_name[regno];
break;
case 32:
if (SSE_REG_P (x))
{
gcc_assert (!duplicated);
putc ('y', file);
- fputs (hi_reg_name[REGNO (x)] + 1, file);
+ fputs (hi_reg_name[regno] + 1, file);
return;
}
break;
@@ -14943,22 +14940,6 @@ ix86_print_operand_address (FILE *file, rtx addr)
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;
index = parts.index;
disp = parts.disp;