public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/43175]  New: __builtin_ia32_vec_perm_v4si doesn't work with AVX
@ 2010-02-25 14:48 hjl dot tools at gmail dot com
  2010-02-25 14:53 ` [Bug target/43175] " hjl dot tools at gmail dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-02-25 14:48 UTC (permalink / raw)
  To: gcc-bugs

On Linux/Intel64,

---
typedef int S;
typedef int V __attribute__((vector_size(16)));
typedef int IV __attribute__((vector_size(16)));
typedef union { S s[4]; V v; } U;

static U i[2], b, c;

extern int memcmp (const void *, const void *, __SIZE_TYPE__);
extern void abort ();

int main()
{
  i[0].s[0] = 0;
  i[0].s[1] = 1;
  i[0].s[2] = 2;
  i[0].s[3] = 3;
  i[0].s[4] = 4;
  i[0].s[5] = 5;
  i[0].s[6] = 6;
  i[0].s[7] = 7;

  b.v = __builtin_ia32_vec_perm_v4si (i[0].v, i[1].v, (IV){4, 1, 2, 3});
  c.s[0] = i[0].s[4];
  c.s[1] = i[0].s[1];
  c.s[2] = i[0].s[2];
  c.s[3] = i[0].s[3];
  __asm__("" : : : "memory");
  if (memcmp (&b, &c, sizeof(c)) != 0)
      abort ();

  return 0;
}
--

aborted with -mavx. You can get Intel AVX SDE from

http://software.intel.com/en-us/avx/

to run it:

[hjl@gnu-6 gcc]$ ./xgcc -B./ -O -mavx /tmp/perm.c
[hjl@gnu-6 gcc]$ ./sde -- ./a.out 
Aborted
[hjl@gnu-6 gcc]$ ./xgcc -B./ -O -mssse3 /tmp/perm.c
[hjl@gnu-6 gcc]$ ./a.out 
[hjl@gnu-6 gcc]$


-- 
           Summary: __builtin_ia32_vec_perm_v4si doesn't work with AVX
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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


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

end of thread, other threads:[~2010-03-02 13:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 14:48 [Bug target/43175] New: __builtin_ia32_vec_perm_v4si doesn't work with AVX hjl dot tools at gmail dot com
2010-02-25 14:53 ` [Bug target/43175] " hjl dot tools at gmail dot com
2010-02-25 14:55 ` hjl dot tools at gmail dot com
2010-02-25 15:07 ` hjl dot tools at gmail dot com
2010-02-25 15:10 ` ubizjak at gmail dot com
2010-02-25 15:30 ` hjl dot tools at gmail dot com
2010-02-25 19:01 ` ubizjak at gmail dot com
2010-02-25 19:03 ` ubizjak at gmail dot com
2010-02-25 19:25 ` hjl dot tools at gmail dot com
2010-02-25 19:34 ` [Bug target/43175] __builtin_ia32_vec_perm_v4si doesn't work with -msse4.1 hjl dot tools at gmail dot com
2010-02-25 19:44 ` ubizjak at gmail dot com
2010-02-25 19:55 ` hjl dot tools at gmail dot com
2010-02-25 20:12 ` ubizjak at gmail dot com
2010-02-25 20:33 ` hjl dot tools at gmail dot com
2010-02-25 20:36 ` hjl dot tools at gmail dot com
2010-02-25 20:49 ` ubizjak at gmail dot com
2010-02-26  0:54 ` hjl dot tools at gmail dot com
2010-02-26 13:19 ` hjl at gcc dot gnu dot org
2010-03-02 13:31 ` hjl dot tools at gmail dot com

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).