aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
blob: da32337e75d1d572abea176367df5e3dcbabde35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Test expected code generation for lvsl and lvsr on little endian.
   Note that lvsl and lvsr are each produced once, but the filename
   causes them to appear twice in the file.  */

/* { dg-do compile { target { powerpc64le-*-* } } } */
/* { dg-options "-mcpu=power7 -O0 -Wno-deprecated" } */
/* { dg-final { scan-assembler-times "lvsl" 2 } } */
/* { dg-final { scan-assembler-times "lvsr" 2 } } */
/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
/* { dg-final { scan-assembler-times "vperm" 2 } } */


#include <altivec.h>

float f[20];

void foo ()
{
  vector unsigned char a = vec_lvsl (4, f);
  vector unsigned char b = vec_lvsr (8, f);
}