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]

Re: [PATCH] Improve SSE4.1+ float extraction from V4SFmode


On Mon, Sep 19, 2011 at 1:33 PM, Jakub Jelinek <jakub@redhat.com> wrote:

> As mentioned in an earlier posting, for -msse4.1 and above
> on the gcc.target/i386/{sse2,avx}-extract-1.c testcases we
> generate inefficient code when trying to extract SFmode
> from V4SFmode, unless it is the element 0.
> The problem is that the sse4_1_extractps pattern matches, but
> doesn't have a "=x" alternative, so we end up doing a
> {,v}extractps into memory and load the SFmode value from memory.
> The following patch adds the alternatives and splitters, so that
> it is reshuffled in that case instead of spilling it.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2011-09-19 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?* config/i386/sse.md (*sse4_1_extractps): Change into
> ? ? ? ?define_insn_and_split, add =x 0 n and =x x n alternatives
> ? ? ? ?and split them after reload.

> + ?[(set_attr "type" "sselog,*,*")
> + ? (set_attr "isa" "base,noavx,avx")

Please put "isa" attribute as the first in the attribute table. Also,
"base" is the default, so "*,noavx,avx" should do, too.

Thanks,
Uros.


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