aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2013-02-07 17:15:02 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2013-02-07 17:15:02 +0000
commit027ece11c1e1e4ea23a92b49699934a192d155cc (patch)
tree56311bdf8734bb5677f0044a0e6e8b21916b4c00
parentaa62fd35b56fbbe16fa7aa3176b5b6e4ff4c5c77 (diff)
downloadgcc-027ece11c1e1e4ea23a92b49699934a192d155cc.zip
gcc-027ece11c1e1e4ea23a92b49699934a192d155cc.tar.gz
gcc-027ece11c1e1e4ea23a92b49699934a192d155cc.tar.bz2
re PR rtl-optimization/56225 (ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3)
2013-02-07 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/56225 * lra-constraints.c (process_alt_operands): Check that reload hard reg can hold value for strict_low_part. 2013-02-07 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/56225 * gcc.target/i386/pr56225.c: New test. From-SVN: r195856
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lra-constraints.c17
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56225.c12
4 files changed, 39 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a1ad361..c8551dc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-02-07 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/56225
+ * lra-constraints.c (process_alt_operands): Check that reload hard
+ reg can hold value for strict_low_part.
+
2013-02-07 Jakub Jelinek <jakub@redhat.com>
PR debug/56154
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index cc28854..932b699 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1895,7 +1895,22 @@ process_alt_operands (int only_alternative)
? in_hard_reg_set_p (this_alternative_set,
mode, hard_regno[nop])
: in_class_p (op, this_alternative, NULL))))
- losers++;
+ {
+ /* Strict_low_part requires reload the register not
+ the sub-register. In this case we should check
+ that a final reload hard reg can hold the
+ value. */
+ if (curr_static_id->operand[nop].strict_low
+ && REG_P (op)
+ && hard_regno[nop] < 0
+ && GET_CODE (*curr_id->operand_loc[nop]) == SUBREG
+ && ira_class_hard_regs_num[this_alternative] > 0
+ && ! HARD_REGNO_MODE_OK (ira_class_hard_regs
+ [this_alternative][0],
+ GET_MODE (op)))
+ goto fail;
+ losers++;
+ }
if (operand_reg[nop] != NULL_RTX
/* Output operands and matched input operands are
not inherited. The following conditions do not
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c024e08..95b4bf6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-07 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/56225
+ * gcc.target/i386/pr56225.c: New test.
+
2013-02-07 Jakub Jelinek <jakub@redhat.com>
PR debug/56154
diff --git a/gcc/testsuite/gcc.target/i386/pr56225.c b/gcc/testsuite/gcc.target/i386/pr56225.c
new file mode 100644
index 0000000..638c0ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56225.c
@@ -0,0 +1,12 @@
+/* PR target/56225 */
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -march=pentium3 -mtune=generic" } */
+
+void bar (int);
+
+void
+foo (int x, int y)
+{
+ __attribute__ ((vector_size (8 * sizeof (short)))) short s0 = { x };
+ bar ((short) (long) &s0 + y);
+}