summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr30843.c
blob: 616b618f4d837ec54fe20196b9cc4fe56a2b243a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do compile } */
/* { dg-require-effective-target vect_long } */

#include <stdarg.h>
#include "tree-vect.h"

#define N 16

void dacP98FillRGBMap (unsigned char *pBuffer)
{
    unsigned long dw, dw1;
    unsigned long *pdw = (unsigned long *)(pBuffer);

    for( dw = 256, dw1 = 0; dw; dw--, dw1 += 0x01010101) 
    {
       *pdw++ = dw1;
       *pdw++ = dw1;
       *pdw++ = dw1;
       *pdw++ = dw1;
    }
}

/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */