blob: 7b0d546d02e6c75da9215a28f46eb25444d82cba (
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
29
30
31
32
33
34
35
36
|
/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with char
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-options "-maltivec -O2" } */
/* { dg-require-effective-target powerpc_altivec } */
#include <altivec.h>
vector bool short
testbc_l (vector bool char vbc2)
{
return vec_unpackl (vbc2);
}
vector signed short
testsc_l (vector signed char vsc2)
{
return vec_unpackl (vsc2);
}
vector bool short
testbc_h (vector bool char vbc2)
{
return vec_unpackh (vbc2);
}
vector signed short
testsc_h (vector signed char vsc2)
{
return vec_unpackh (vsc2);
}
/* { dg-final { scan-assembler-times "vupkhsb" 2 } } */
/* { dg-final { scan-assembler-times "vupklsb" 2 } } */
|