]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2013-06-06 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Jun 2013 20:58:46 +0000 (20:58 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Jun 2013 20:58:46 +0000 (20:58 +0000)
PR rtl-optimization/57459
* lra-constraints.c (update_ebb_live_info): Fix typo for operand
type when setting live regs.

2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/57459
* gcc.target/i386/pr57459.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199762 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lra-constraints.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr57459.c [new file with mode: 0644]

index 6fe6b6dc1ed1d15903677de60e0e8a29e2e27c86..aa76576aae5e730b763109e133fb39ac698d47ec 100644 (file)
@@ -1,3 +1,9 @@
+2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/57459
+       * lra-constraints.c (update_ebb_live_info): Fix typo for operand
+       type when setting live regs.
+
 2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>
 
        * config/s390/s390.opt (mlra): New option.
index ef6e07e10c171f36af948874a69ee0cb2df5c7e1..a9f91c411435b0c2989b4653d412c422ded5dc5c 100644 (file)
@@ -4545,7 +4545,7 @@ update_ebb_live_info (rtx head, rtx tail)
          bitmap_clear_bit (&live_regs, reg->regno);
       /* Mark each used value as live.  */
       for (reg = curr_id->regs; reg != NULL; reg = reg->next)
-       if (reg->type == OP_IN
+       if (reg->type != OP_OUT
            && bitmap_bit_p (&check_only_regs, reg->regno))
          bitmap_set_bit (&live_regs, reg->regno);
       /* It is quite important to remove dead move insns because it
index 035781b98197df820257953789c2de4b4f52f1cf..bfd974e2ab9987ddcd39856b1d1e3a29024ee328 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-06  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/57459
+       * gcc.target/i386/pr57459.c: New test.
+
 2013-06-06  Teresa Johnson  <tejohnson@google.com>
 
        PR c++/53743
diff --git a/gcc/testsuite/gcc.target/i386/pr57459.c b/gcc/testsuite/gcc.target/i386/pr57459.c
new file mode 100644 (file)
index 0000000..7510114
--- /dev/null
@@ -0,0 +1,60 @@
+/* PR rtl-optimization/57459 */
+/* { dg-do run } */
+/* { dg-options "-fno-inline -O2 -minline-all-stringops -fno-omit-frame-pointer" } */
+
+int total1[10], total2[10], total3[10], total4[10], total5[10], a[20];
+int len;
+
+void stackclean() {
+  void *ptr = __builtin_alloca(20000);
+  __builtin_memset(ptr, 0, 20000);
+}
+
+void foo(const char *s) {
+  int r1 = a[1];
+  int r2 = a[2];
+  int r3 = a[3];
+  int r4 = a[4];
+  int r5 = a[5];
+
+  len =  __builtin_strlen(s);
+
+  if (s != 0)
+    return;
+
+  while (r1) {
+   total1[r1] = r1;
+   r1--;
+  }
+
+  while (r2) {
+   total2[r2] = r2;
+   r2--;
+  }
+
+  while (r3) {
+   total3[r3] = r3;
+   r3--;
+  }
+
+  while (r4) {
+   total4[r4] = r4;
+   r4--;
+  }
+
+  while (r5) {
+   total5[r5] = r5;
+   r5--;
+  }
+}
+
+extern void abort (void);
+
+int main() {
+  stackclean();
+  foo("abcdefgh");
+  if (len != 8)
+    abort ();
+  return 0;
+}
+