This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add value range support into memcpy/memset expansion
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>, steven at gcc dot gnu dot org
- Date: Mon, 18 Nov 2013 06:19:57 -0800
- Subject: Re: Add value range support into memcpy/memset expansion
- Authentication-results: sourceware.org; auth=none
- References: <20130927145046 dot GC6666 at kam dot mff dot cuni dot cz> <20131115094517 dot GA18020 at atrey dot karlin dot mff dot cuni dot cz> <alpine dot LNX dot 2 dot 00 dot 1311151119170 dot 4261 at zhemvz dot fhfr dot qr> <20131117233820 dot GE2268 at kam dot mff dot cuni dot cz>
On Sun, Nov 17, 2013 at 3:38 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this is version I comitted. It also adds a testcase and enables the support in i386 backend.
>
> Honza
>
> * doc/md.texi (setmem, movstr): Update documentation.
> * builtins.c (determine_block_size): New function.
> (expand_builtin_memcpy): Use it and pass it to
> emit_block_move_hints.
> (expand_builtin_memset_args): Use it and pass it to
> set_storage_via_setmem.
> * expr.c (emit_block_move_via_movmem): Add min_size/max_size parameters;
> update call to expander.
> (emit_block_move_hints): Add min_size/max_size parameters.
> (clear_storage_hints): Likewise.
> (set_storage_via_setmem): Likewise.
> (clear_storage): Update.
> * expr.h (emit_block_move_hints, clear_storage_hints,
> set_storage_via_setmem): Update prototype.
> * i386.c (ix86_expand_set_or_movmem): Add bounds; export.
> (ix86_expand_movmem, ix86_expand_setmem): Remove.
> (ix86_expand_movmem, ix86_expand_setmem): Remove.
> * i386.md (movmem, setmem): Pass parameters.
>
> * testsuite/gcc.target/i386/memcpy-2.c: New testcase.
The new testcase fails for me on x86 and x86-64:
FAIL: gcc.target/i386/memcpy-2.c scan-assembler-not memcpy
FAIL: gcc.target/i386/memcpy-2.c (test for excess errors)
--
H.J.