view gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* 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 "-O0 -Wno-deprecated" } */
/* { dg-final { scan-assembler-times "lvsl" 2 } } */
/* { dg-final { scan-assembler-times "lvsr" 2 } } */
/* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 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);
}