On Thu, Jul 23, 2020 at 4:50 PM Martin Sebor wrote: > > On 7/23/20 2:18 PM, H.J. Lu wrote: > > On Thu, Jul 23, 2020 at 1:14 PM Martin Sebor via Gcc-patches > > wrote: > >> > >> On 7/22/20 2:23 AM, Rainer Orth wrote: > >>> Hi Martin, > >>> > >>>> I have committed this change in r11-2231 after Jeff approved it > >>>> off list last Thursday. > >>> > >>> the new gcc.target/i386/memcpy-pr95886.c test FAILs on 32-bit x86 > >>> (i386-pc-solaris2.11): > >>> > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 1976943448883713" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 576467370915332609" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 578431098682540545" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 578437695685198337" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 578437695685198337" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 578437695752110593" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 578437695752306689" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 578437695752307200" 1 > >>> +FAIL: gcc.target/i386/memcpy-pr95886.c scan-rtl-dump-times expand "const_int 578437695752307201" 2 > >> > >> Thanks for letting me know. The test looks for patterns that are > >> apparently LP64-specific so I restricted it to just that data model. > >> > > > > Shouldn't it also work for x32? > > I would expect the optimization to work on any target that does > the piecemeal copy, including x32. But you probably meant if > the test should pass as is on x32. Possibly yes, but I didn't > check. > > A better test would exercise the solution at least on all three > i386 targets. It could probably be done fairly simply by reducing > the sizes of the arrays, or by using the large arrays only on LP64 > or whatever makes the difference and figuring out the right magic > target selector to use in the dg- directives. Here is the patch I am checking in. -- H.J.