]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_expand_movmem, [...]): Add zero guard even if align_bytes != 0 and count...
authorJakub Jelinek <jakub@redhat.com>
Fri, 9 Jan 2009 20:03:37 +0000 (21:03 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 9 Jan 2009 20:03:37 +0000 (21:03 +0100)
* config/i386/i386.c (ix86_expand_movmem, ix86_expand_setmem): Add
zero guard even if align_bytes != 0 and count is smaller than
size_needed.

From-SVN: r143229

gcc/ChangeLog
gcc/config/i386/i386.c

index d7cebcfcb3f3d21772a87d385f23e6f5e027baba..0f0331a5bf04bfe231bc5439c5ff1ad45525cdad 100644 (file)
@@ -1,3 +1,9 @@
+2009-01-09  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/i386/i386.c (ix86_expand_movmem, ix86_expand_setmem): Add
+       zero guard even if align_bytes != 0 and count is smaller than
+       size_needed.
+
 2008-01-09  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR rtl-optimization/38495
index f44667fffc294a6cb90da2d9d40f6a34a8ae98da..b5fea236db290dd573928e41fe78657592772f16 100644 (file)
@@ -17720,7 +17720,7 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp,
          count -= align_bytes;
        }
       if (need_zero_guard
-         && (!count
+         && (count < (unsigned HOST_WIDE_INT) size_needed
              || (align_bytes == 0
                  && count < ((unsigned HOST_WIDE_INT) size_needed
                              + desired_align - align))))
@@ -18112,7 +18112,7 @@ ix86_expand_setmem (rtx dst, rtx count_exp, rtx val_exp, rtx align_exp,
          count -= align_bytes;
        }
       if (need_zero_guard
-         && (!count
+         && (count < (unsigned HOST_WIDE_INT) size_needed
              || (align_bytes == 0
                  && count < ((unsigned HOST_WIDE_INT) size_needed
                              + desired_align - align))))