1 /* Verify that overloaded built-ins for vec_msum() with char inputs
2 produce the right results. */
3
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2" } */
7
8 #include <altivec.h>
9
10 vector unsigned int
test_msum_ui_uc_uc_ui(vector unsigned char vuc2,vector unsigned char vuc3,vector unsigned int vui2)11 test_msum_ui_uc_uc_ui (vector unsigned char vuc2, vector unsigned char vuc3,
12 vector unsigned int vui2)
13 {
14 return vec_msum (vuc2, vuc3, vui2);
15 }
16
17 vector signed int
test_msum_si_sc_uc_si(vector signed char vsc2,vector unsigned char vuc3,vector signed int vsi2)18 test_msum_si_sc_uc_si (vector signed char vsc2, vector unsigned char vuc3,
19 vector signed int vsi2)
20 {
21 return vec_msum (vsc2, vuc3, vsi2);
22 }
23
24 /* { dg-final { scan-assembler-times "vmsumubm" 1 } } */
25 /* { dg-final { scan-assembler-times "vmsummbm" 1 } } */
26