This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, x86] Use vector moves in memmove expanding
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Michael V. Zolotukhin" <michael dot v dot zolotukhin at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, "H.J. Lu" <hjl dot tools at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Ond??ej B?lka <neleai at seznam dot cz>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Mon, 9 Sep 2013 09:59:02 +0200
- Subject: Re: [PATCH, x86] Use vector moves in memmove expanding
- Authentication-results: sourceware.org; auth=none
- References: <20130705112534 dot GA10164 at kam dot mff dot cuni dot cz> <CAGs3Rfs86yLj3-1HkAMnkf4ey87cZgiqajLAH=WC9mpg6OJLiw at mail dot gmail dot com> <7703907 dot JSoGtmLQkn at polaris> <CAMe9rOrphfykcfD5FApBH-Bp-Wuu8eu7qFQ+256fMgdT0WJcAA at mail dot gmail dot com> <CANtU079EYp6MH1ZhXVFk9gtC19dCMq37tDer8unwqh65fKy-pg at mail dot gmail dot com> <20130909072317 dot GA53568 at msticlxl57 dot ims dot intel dot com> <20130909072434 dot GA21984 at kam dot mff dot cuni dot cz> <20130909074205 dot GB53568 at msticlxl57 dot ims dot intel dot com> <20130909074643 dot GC1817 at tucnak dot redhat dot com> <20130909075249 dot GC53568 at msticlxl57 dot ims dot intel dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Sep 09, 2013 at 11:52:49AM +0400, Michael V. Zolotukhin wrote:
> > I don't see anything i386 specific on the testcase, except the flags,
> > and don't see why you need -fno-common in there, there are no global vars.
> > So, I think it would be better to stick it into gcc.dg/torture/, drop
> > dg-require-* line and instead just add
> > /* { dg-additional-options "-march=pentiumpro" { target ia32 } } */
> > /* { dg-additional-options "-minline-all-stringops" { target { i?86-*-* x86_64-*-* } } } */
> > or so (and let it cycle through all the -O* options).
> Originally the test targeted a specific situation, happening on pentiumpro (and
> thus ia32), because on pentium pro we want 64-bit alignment for 32-bit
> rep-moves. So, it reveals an issue when desired alignment is bigger than size
> of move_mode.
> I don't see if it could be helpful on other platforms, though if
> you think it's worthwhile, I'll update the test as you suggested.
I think it is worthwhile, various targets have many different ways to expand
memcpy, admittedly i?86/x86_64 probably the biggest number of these, and
while right now you've encountered it on ia32 with certain options doesn't
mean that in a few years it couldn't hit some unrelated target, arm, sh,
sparc, whatever.
Jakub