+2017-02-27 Pat Haugen <pthaugen@us.ibm.com>
+
+ PR target/79544
+ * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
+ for arithmetic shift of unsigned V2DI.
+
2017-02-27 Claudiu Zissulescu <claziss@synopsys.com>
* config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
{ ALTIVEC_BUILTIN_VEC_SRA, P8V_BUILTIN_VSRAD,
RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
- { ALTIVEC_BUILTIN_VEC_SRA, P8V_BUILTIN_VSRD,
+ { ALTIVEC_BUILTIN_VEC_SRA, P8V_BUILTIN_VSRAD,
RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
{ ALTIVEC_BUILTIN_VEC_VSRAW, ALTIVEC_BUILTIN_VSRAW,
RS6000_BTI_V4SI, RS6000_BTI_V4SI, RS6000_BTI_unsigned_V4SI, 0 },
{ P8V_BUILTIN_VEC_VSRAD, P8V_BUILTIN_VSRAD,
RS6000_BTI_V2DI, RS6000_BTI_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
- { P8V_BUILTIN_VEC_VSRAD, P8V_BUILTIN_VSRD,
+ { P8V_BUILTIN_VEC_VSRAD, P8V_BUILTIN_VSRAD,
RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, RS6000_BTI_unsigned_V2DI, 0 },
{ P8V_BUILTIN_VEC_VSUBCUQ, P8V_BUILTIN_VSUBCUQ,
--- /dev/null
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+#include <altivec.h>
+
+vector unsigned long long
+test_sra (vector unsigned long long x, vector unsigned long long y)
+{
+ return vec_sra (x, y);
+}
+
+/* { dg-final { scan-assembler "vsrad" } } */
+