[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / altivec-cell-7.c
blobcbe5fb9f8a70c298884200210fb6d0a6303cb483
1 /* { dg-do compile } */
2 /* { dg-require-effective-target powerpc_altivec_ok } */
3 /* { dg-options "-O2 -maltivec -mabi=altivec -mdejagnu-cpu=cell" } */
4 /* { dg-final { scan-assembler-times "vor" 2 } } */
5 #include <altivec.h>
7 /* Make sure that lvlx and lvrx are not combined into one insn and
8 we still get a vor. */
10 vector unsigned char
11 lvx_float (long off, float *p)
13 vector unsigned char l, r;
15 l = (vector unsigned char) vec_lvlx (off, p);
16 r = (vector unsigned char) vec_lvrx (off, p);
17 return vec_or(l, r);
20 vector unsigned char
21 lvxl_float (long off, float *p)
23 vector unsigned char l, r;
25 l = (vector unsigned char) vec_lvlxl (off, p);
26 r = (vector unsigned char) vec_lvrxl (off, p);
27 return vec_or(l, r);