2017-08-28 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / altivec-cell-7.c
blob63e807380d03f56404d181cc0a9da9efac36d3d1
1 /* { dg-do compile } */
2 /* { dg-require-effective-target powerpc_altivec_ok } */
3 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=cell" } } */
4 /* { dg-options "-O2 -maltivec -mabi=altivec -mcpu=cell" } */
5 /* { dg-final { scan-assembler-times "vor" 2 } } */
6 #include <altivec.h>
8 /* Make sure that lvlx and lvrx are not combined into one insn and
9 we still get a vor. */
11 vector unsigned char
12 lvx_float (long off, float *p)
14 vector unsigned char l, r;
16 l = (vector unsigned char) vec_lvlx (off, p);
17 r = (vector unsigned char) vec_lvrx (off, p);
18 return vec_or(l, r);
21 vector unsigned char
22 lvxl_float (long off, float *p)
24 vector unsigned char l, r;
26 l = (vector unsigned char) vec_lvlxl (off, p);
27 r = (vector unsigned char) vec_lvrxl (off, p);
28 return vec_or(l, r);