1 /* { dg-do compile } */
2 /* { dg-options "-O3 -mzarch -march=arch13 -mzvector -fno-asynchronous-unwind-tables -dp" } */
3 
4 #include <vecintrin.h>
5 
6 vector unsigned char
foo1(vector unsigned char a,vector unsigned char b)7 foo1 (vector unsigned char a, vector unsigned char b)
8 {
9   return vec_sldb (a, b, 0);
10 }
11 
12 vector signed char
foo2(vector signed char a,vector signed char b)13 foo2 (vector signed char a, vector signed char b)
14 {
15   return vec_sldb (a, b, 1);
16 }
17 
18 
19 vector unsigned short
foo3(vector unsigned short a,vector unsigned short b)20 foo3 (vector unsigned short a, vector unsigned short b)
21 {
22   return vec_sldb (a, b, 2);
23 }
24 
25 vector signed short
foo4(vector signed short a,vector signed short b)26 foo4 (vector signed short a, vector signed short b)
27 {
28   return vec_sldb (a, b, 3);
29 }
30 
31 vector unsigned int
foo5(vector unsigned int a,vector unsigned int * b)32 foo5 (vector unsigned int a, vector unsigned int *b)
33 {
34   return vec_sldb (a, *b, 4);
35 }
36 
37 vector signed int
foo6(vector signed int a,vector signed int b)38 foo6 (vector signed int a, vector signed int b)
39 {
40   return vec_sldb (a, b, 5);
41 }
42 
43 
44 vector unsigned long long
foo7(vector unsigned long long a,vector unsigned long long b)45 foo7 (vector unsigned long long a, vector unsigned long long b)
46 {
47   return vec_sldb (a, (vector unsigned long long){ 1, 2 }, 6);
48 }
49 
50 vector signed long long
foo8(vector signed long long a,vector signed long long b)51 foo8 (vector signed long long a, vector signed long long b)
52 {
53   return vec_sldb (a, b, 7);
54 }
55 
56 
57 vector float
foo9(vector float a,vector float b)58 foo9 (vector float a, vector float b)
59 {
60   return vec_sldb (a, b, 1);
61 }
62 
63 vector double
foo10(vector double a,vector double b)64 foo10 (vector double a, vector double b)
65 {
66   return vec_sldb (a, b, 3);
67 }
68 
69 /* { dg-final { scan-assembler-times "vsld" 10 } } */
70