This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/38708] [4.4 Regression] Revision 137646 caused gcc.c-torture/execute/memset-[23].c fail with -mtune=pentiumpro



------- Comment #6 from jakub at gcc dot gnu dot org  2009-01-03 09:09 -------
--- i386.c.jj4        2008-12-27 10:12:25.000000000 +0100
+++ i386.c        2009-01-03 10:03:05.000000000 +0100
@@ -18012,13 +18012,12 @@ ix86_expand_setmem (rtx dst, rtx count_e
          Epilogue code will actually copy COUNT_EXP & EPILOGUE_SIZE_NEEDED
          bytes. Compensate if needed.  */

-      if (size_needed < desired_align - align)
+      if (size_needed < epilogue_size_needed)
         {
           tmp =
             expand_simple_binop (counter_mode (count_exp), AND, count_exp,
          GEN_INT (size_needed - 1), count_exp, 1,
          OPTAB_DIRECT);
-          size_needed = desired_align - align + 1;
           if (tmp != count_exp)
             emit_move_insn (count_exp, tmp);
         }
@@ -18029,10 +18028,10 @@ ix86_expand_setmem (rtx dst, rtx count_e
     {
       if (force_loopy_epilogue)
         expand_setmem_epilogue_via_loop (dst, destreg, val_exp, count_exp,
-         size_needed);
+         epilogue_size_needed);
       else
         expand_setmem_epilogue (dst, destreg, promoted_val, count_exp,
-        size_needed);
+        epilogue_size_needed);
     }
   if (jump_around_label)
     emit_label (jump_around_label);

instead seems to fix memset-3.c with -mtune=pentium-m -m32 at all optimizations
levels (and is what ix86_expand_movmem does).  But memset-2.c still fails, and
not just at -O3, but also at -O2.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38708


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]