summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/altivec-cell-7.c
blob: ae77694008eb7da5ca08b6dbca6a2a4b12b9a895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* { dg-do compile  } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-O2 -maltivec -mabi=altivec -mcpu=cell" } */
/* { dg-final { scan-assembler-times "vor" 2 } } */
#include <altivec.h>

/* Make sure that lvlx and lvrx are not combined into one insn and
   we still get a vor. */

vector unsigned char
lvx_float (long off, float *p)
{
    vector unsigned char l, r;

    l = (vector unsigned char) vec_lvlx (off, p);
    r = (vector unsigned char) vec_lvrx (off, p);
    return vec_or(l, r);
}

vector unsigned char
lvxl_float (long off, float *p)
{
    vector unsigned char l, r;

    l = (vector unsigned char) vec_lvlxl (off, p);
    r = (vector unsigned char) vec_lvrxl (off, p);
    return vec_or(l, r);
}