public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/48252] New: problem with consecutive vzip, vuzp and vtrn
@ 2011-03-23 13:07 johan.kristell at axis dot com
  2011-03-29  8:28 ` [Bug target/48252] ARM neon: " johan.kristell at axis dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: johan.kristell at axis dot com @ 2011-03-23 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: problem with consecutive vzip, vuzp and vtrn
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: johan.kristell@axis.com


Consecutive vzip, vuzp or vtrn intrinsic overwrite destination register.

Compiler:

gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc/4.6/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc/4.6/libexec/gcc/armv7l-unknown-linux-gnueabi/4.6.0/lto-wrapper
Target: armv7l-unknown-linux-gnueabi
Configured with: ../gcc-4.6/configure --prefix=/usr/local/gcc/4.6
--enable-languages=c --with-arch=armv7-a --with-float=softfp
--with-fpu=vfpv3-d16
Thread model: posix
gcc version 4.6.0 20110323 (prerelease) (GCC) 


Test case:

#include <arm_neon.h>
#include <stdio.h>

int main(void)
{
    uint8x8_t v1 = {1, 1, 1, 1, 1, 1, 1, 1};
    uint8x8_t v2 = {2, 2, 2, 2, 2, 2, 2, 2};
    uint8x8x2_t vd1, vd2;
    union {uint8x8_t v; uint8_t buf[8];} d1, d2, d3, d4;
    int i;

    vd1 = vzip_u8(v1, vdup_n_u8(0));
    vd2 = vzip_u8(v2, vdup_n_u8(0));

    vst1_u8(d1.buf, vd1.val[0]);
    vst1_u8(d2.buf, vd1.val[1]);
    vst1_u8(d3.buf, vd2.val[0]);
    vst1_u8(d4.buf, vd2.val[1]);

    printf("  d1  d2  d3  d4\n");
    for (i = 0; i < 8; i++) {
        printf("%4d%4d%4d%4d\n",
        d1.buf[i],
        d2.buf[i],
        d3.buf[i],
        d4.buf[i]);
    }

    return 0;
}

---------------------

Compile flags: -mfloat-abi=softfp -mfpu=neon -O2

Output:

  d1  d2  d3  d4
   1   1   2   1
   0   0   0   0
   1   1   2   1
   0   0   0   0
   1   1   2   1
   0   0   0   0
   1   1   2   1
   0   0   0   0

d4 is wrong.


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

end of thread, other threads:[~2011-05-20  8:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23 13:07 [Bug target/48252] New: problem with consecutive vzip, vuzp and vtrn johan.kristell at axis dot com
2011-03-29  8:28 ` [Bug target/48252] ARM neon: " johan.kristell at axis dot com
2011-04-04 21:21 ` ramana at gcc dot gnu.org
2011-04-05  9:34 ` irar at il dot ibm.com
2011-04-05  9:36 ` irar at il dot ibm.com
2011-04-18  7:18 ` irar at gcc dot gnu.org
2011-05-05  7:52 ` irar at gcc dot gnu.org
2011-05-05  8:52 ` irar at gcc dot gnu.org
2011-05-05  9:00 ` irar at il dot ibm.com
2011-05-06 10:26 ` ramana at gcc dot gnu.org
2011-05-20  8:16 ` irar at il dot ibm.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).