summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/p5600-bonding.c
blob: 0890ffa9215a5b9658ceff73927dd5ac2320c039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-dp -mtune=p5600  -mno-micromips -mno-mips16" } */
/* { dg-skip-if "Bonding needs peephole optimization." { *-*-* } { "-O0" "-O1" } { "" } } */
typedef int VINT32 __attribute__ ((vector_size((16))));

void
memory_operation (void * __restrict src, void * __restrict dest, int num)
{
  VINT32 *vsrc = (VINT32 *) src;
  VINT32 *vdest = (VINT32 *) dest;
  int i;

  for (i = 0; i < num - 1; i += 2)
  {
    vdest[i] = vdest[i] + vsrc[i];
    vdest[i + 1] = vdest[i + 1] + vsrc[i + 1];
  }
}
/* { dg-final { scan-assembler "join2_" } }  */