public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/54219] New: __builtin_shuffle mask reversed
@ 2012-08-10 10:40 glisse at gcc dot gnu.org
  2012-08-10 10:59 ` [Bug middle-end/54219] [4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-08-10 10:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54219

             Bug #: 54219
           Summary: __builtin_shuffle mask reversed
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: glisse@gcc.gnu.org


Hello,

#include <x86intrin.h>

__m128d f(__m128d x){
  __m128i m={5,0};
  return __builtin_shuffle(x,x,m);
}

$ gcc u.c -O2 -S -Wall

produces a simple rep; ret. However, if I replace 5 with 1, it does produce the
expected shufpd.

fold-const.c contains this loop:
              for (i = 0; i < nelts; i++)
                tsel[i] = build_int_cst (eltype, sel[nelts - i - 1]);

which reverses the order of the elements in the mask. I don't know if there is
any reason to do that...


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-10 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-10 10:40 [Bug middle-end/54219] New: __builtin_shuffle mask reversed glisse at gcc dot gnu.org
2012-08-10 10:59 ` [Bug middle-end/54219] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-08-10 11:00 ` rguenth at gcc dot gnu.org
2012-08-10 13:35 ` rguenth at gcc dot gnu.org
2012-08-10 13:36 ` rguenth at gcc dot gnu.org
2012-08-10 13:36 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).