This is the mail archive of the gcc-patches@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]

[PATCH, i386]: Fix PR 66648, incorrect memcpy expansion with unrolled_loop strategy


Hello!

As explained in the PR [1], we have to emit check for main loop
execution UNLESS we guarantee that min_size is at least equal to
size_needed. In this testcase, VRP declared minimum copying size, and
after unaligned prologue adjustment, min_size was still non-zero. The
!min_size check didn't account for the case that min_size can be
non-zero, but still less than size_needed.

2015-06-26  Uros Bizjak  <ubizjak@gmail.com>

    PR target/66648
    * config/i386/i386.c (ix86_expand_set_or_movmem): Emit main loop
    execution guard when min_size is less than size_needed.

testsuite/ChangeLog:

2015-06-26  Uros Bizjak  <ubizjak@gmail.com>

    PR target/66648
    * gcc.target/i386/pr66648.c: New test.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Honza, does the patch look OK to you?

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66648

Uros.

Attachment: p.diff.txt
Description: Text document


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