On 11/26/13 13:20, Jakub Jelinek wrote:
Hi!

As the testcase in the patch shows, if exact memcpy or memset count
is unknown, but max_size is smaller than epilogue_size_needed,
ix86_expand_set_or_movmem can ICE.

The following patch fixes that, bootstrapped/regtested on x86_64-linux
and i686-linux, ok for trunk?

Though, the resulting code doesn't look very good, as everything is expanded
as just epilogue of the copying/memset, I think the probabilities on the
branches expect that all bits of the remaining size are 0 after the main
loop (which isn't done in this case).

2013-11-26  Jakub Jelinek  <ja...@redhat.com>

        PR target/59229
        * config/i386/i386.c (device_alg): Fix up formatting.
        (ix86_expand_set_or_movmem): Handle max_size < epilogue_size_needed
        similarly to count && count < epilogue_size_needed.  Fix up
        comment typo.
        * builtins.c (determine_block_size): Fix comment typo.

        * gcc.c-torture/execute/pr59229.c: New test.
OK.
Jeff

Reply via email to