[Bug target/38488] [4.4 Regression] x86_64 generates much larger and slightly slower code for memset

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Dec 22 23:37:00 GMT 2008



------- Comment #1 from jakub at gcc dot gnu dot org  2008-12-22 23:35 -------
Subject: Bug 38488

Author: jakub
Date: Mon Dec 22 23:34:07 2008
New Revision: 142891

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142891
Log:
        * config/i386/i386.c (expand_setmem_via_rep_stos): Add ORIG_VALUE
        argument.  If ORIG_VALUE is const0_rtx and COUNT is constant,
        set MEM_SIZE on DESTMEM.
        (ix86_expand_setmem): Adjust callers.

        PR target/38488
        * expr.h (get_mem_align_offset): New prototype.
        * emit-rtl.c (get_mem_align_offset): New function.
        * config/i386/i386.c (expand_movmem_via_rep_mov): Set MEM_SIZE
correctly.
        (expand_constant_movmem_prologue, expand_constant_setmem_prologue):
        New functions.
        (ix86_expand_movmem): Optimize if COUNT_EXP
        is constant, desired_align > align and dst & (desired_align - 1)
        is computable at compile time.
        (ix86_expand_setmem): Likewise.

        * builtins.c (get_memory_rtx): Try to derive MEM_ATTRS from not yet
        resolved SAVE_EXPR or POINTER_PLUS_EXPR.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/config/i386/i386.c
    trunk/gcc/emit-rtl.c
    trunk/gcc/expr.h


-- 


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



More information about the Gcc-bugs mailing list