+2017-06-07 Carl Love <cel@us.ibm.com>
+
+ * config/rs6000/rs6000-c: The return type of the following
+ built-in functions was implemented as int not long long. Fix sign
+ of return value for the unsigned version of vec_mulo and vec_mule.
+ vector unsigned long long vec_bperm (vector unsigned long long,
+ vector unsigned char)
+ vector signed long long vec_mule (vector signed int,
+ vector signed int)
+ vector unsigned long long vec_mule (vector unsigned int,
+ vector unsigned int)
+ vector signed long long vec_mulo (vector signed int,
+ vector signed int)
+ vector unsigned long long vec_mulo (vector unsigned int,
+ vector unsigned int)
+ * doc/extend.texi: Fix the documentation for the built-in
+ functions.
+
2017-06-07 Carl Love <cel@us.ibm.com>
PR target/80982
{ ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULESH,
RS6000_BTI_V4SI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 },
{ ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULESH,
- RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
- { ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULESH,
- RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI,
+ RS6000_BTI_V2DI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
+ { ALTIVEC_BUILTIN_VEC_MULE, ALTIVEC_BUILTIN_VMULEUH,
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V4SI,
RS6000_BTI_unsigned_V4SI, 0 },
{ ALTIVEC_BUILTIN_VEC_VMULEUB, ALTIVEC_BUILTIN_VMULEUB,
RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0 },
{ ALTIVEC_BUILTIN_VEC_MULO, ALTIVEC_BUILTIN_VMULOUH,
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V8HI, RS6000_BTI_unsigned_V8HI, 0 },
{ ALTIVEC_BUILTIN_VEC_MULO, ALTIVEC_BUILTIN_VMULOSH,
- RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
- { ALTIVEC_BUILTIN_VEC_MULO, ALTIVEC_BUILTIN_VMULOSH,
- RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI,
+ RS6000_BTI_V2DI, RS6000_BTI_V4SI, RS6000_BTI_V4SI, 0 },
+ { ALTIVEC_BUILTIN_VEC_MULO, ALTIVEC_BUILTIN_VMULOUH,
+ RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V4SI,
RS6000_BTI_unsigned_V4SI, 0 },
{ ALTIVEC_BUILTIN_VEC_MULO, ALTIVEC_BUILTIN_VMULOSH,
RS6000_BTI_V4SI, RS6000_BTI_V8HI, RS6000_BTI_V8HI, 0 },
vector unsigned int vec_mule (vector unsigned short,
vector unsigned short);
vector signed int vec_mule (vector signed short, vector signed short);
-vector unsigned int vec_mule (vector unsigned int,
- vector unsigned int);
-vector signed int vec_mule (vector signed int,
- vector signed int);
+vector unsigned long long vec_mule (vector unsigned int,
+ vector unsigned int);
+vector signed long long vec_mule (vector signed int,
+ vector signed int);
vector signed int vec_vmulesh (vector signed short,
vector signed short);
vector unsigned int vec_mulo (vector unsigned short,
vector unsigned short);
vector signed int vec_mulo (vector signed short, vector signed short);
-vector unsigned int vec_mulo (vector unsigned short, vector unsigned short);
+vector unsigned long long vec_mulo (vector unsigned int,
+ vector unsigned int);
+vector signed long long vec_mulo (vector signed int,
+ vector signed int);
vector signed int vec_vmulosh (vector signed short,
vector signed short);
+2017-06-07 Carl Love <cel@us.ibm.com>
+ * gcc.target/powerpc/builtins-3.c: Fix vec_mule, vec_mulo test cases.
+
2017-06-07 Jonathan Wakely <jwakely@redhat.com>
PR c++/80990
return vec_slo (x, y);
}
-vector signed int
-test_vsi_mule_vsi_vsi (vector signed int x, vector signed int y)
+vector signed long long
+test_vsll_mule_vsi_vsi (vector signed int x, vector signed int y)
{
return vec_mule (x, y);
}
-vector unsigned int
-test_vui_mule_vui_vui (vector unsigned int x, vector unsigned int y)
+vector unsigned long long
+test_vull_mule_vui_vui (vector unsigned int x, vector unsigned int y)
{
return vec_mule (x, y);
}
-vector signed int
-test_vsi_mulo_vsi_vsi (vector signed int x, vector signed int y)
+vector signed long long
+test_vsll_mulo_vsi_vsi (vector signed int x, vector signed int y)
{
return vec_mulo (x, y);
}
-vector unsigned int
-test_vui_mulo_vui_vui (vector unsigned int x, vector unsigned int y)
+vector unsigned long long
+test_vull_mulo_vui_vui (vector unsigned int x, vector unsigned int y)
{
return vec_mulo (x, y);
}
test_vsll_slo_vsll_vuc 1 vslo
test_vull_slo_vsll_vsc 1 vslo
test_vull_slo_vsll_vuc 1 vslo
- test_vsi_mulo_vsi_vsi 1 vmulosh
- test_vui_mulo_vui_vui 1 vmulosh
- test_vsi_mule_vsi_vsi 1 vmulesh
- test_vui_mule_vui_vui 1 vmulesh
+ test_vsll_mulo_vsi_vsi 1 vmulosh
+ test_vull_mulo_vui_vui 1 vmulouh
+ test_vsll_mule_vsi_vsi 1 vmulesh
+ test_vull_mule_vui_vui 1 vmuleuh
test_vsc_mulo_vsc_vsc 1 xxsldwi
test_vuc_mulo_vuc_vuc 1 xxsldwi
test_vssi_mulo_vssi_vssi 1 xxsldwi
/* { dg-final { scan-assembler-times "xvnegsp" 1 } } */
/* { dg-final { scan-assembler-times "xvnegdp" 1 } } */
/* { dg-final { scan-assembler-times "vslo" 4 } } */
-/* { dg-final { scan-assembler-times "vmulosh" 2 } } */
-/* { dg-final { scan-assembler-times "vmulesh" 2 } } */
+/* { dg-final { scan-assembler-times "vmulosh" 1 } } */
+/* { dg-final { scan-assembler-times "vmulouh" 1 } } */
+/* { dg-final { scan-assembler-times "vmulesh" 1 } } */
+/* { dg-final { scan-assembler-times "vmuleuh" 1 } } */
/* { dg-final { scan-assembler-times "xxsldwi" 8 } } */