@@ -4256,6 +4256,14 @@ rs6000_option_override_internal (bool global_init_p)
&& !(rs6000_isa_flags_explicit & OPTION_MASK_TOC_FUSION))
rs6000_isa_flags |= OPTION_MASK_TOC_FUSION;
+ /* ISA 3.0 vector instructions include ISA 2.07. */
+ if (TARGET_P9_VECTOR && !TARGET_P8_VECTOR)
+ {
+ if (rs6000_isa_flags_explicit & OPTION_MASK_P8_VECTOR)
+ error ("-mpower9-vector requires -mpower8-vector");
+ rs6000_isa_flags &= ~OPTION_MASK_P9_VECTOR;
+ }
+
/* -mpower9-dform turns on both -mpower9-dform-scalar and
-mpower9-dform-vector. */
if (TARGET_P9_DFORM_BOTH > 0)
@@ -4298,14 +4306,6 @@ rs6000_option_override_internal (bool global_init_p)
rs6000_isa_flags &= ~OPTION_MASK_P9_DFORM_SCALAR;
}
- /* ISA 3.0 vector instructions include ISA 2.07. */
- if (TARGET_P9_VECTOR && !TARGET_P8_VECTOR)
- {
- if (rs6000_isa_flags_explicit & OPTION_MASK_P8_VECTOR)
- error ("-mpower9-vector requires -mpower8-vector");
- rs6000_isa_flags &= ~OPTION_MASK_P9_VECTOR;
- }
-
/* There have been bugs with -mvsx-timode that don't show up with -mlra,
but do show up with -mno-lra. Given -mlra will become the default once
PR 69847 is fixed, turn off the options with problems by default if
new file mode 100644
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+/* { dg-options "-mcpu=power9 -mno-vsx -O1" } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-final { scan-assembler-times "lvx %?v?2,%?r?3" 1 } } */
+/* { dg-final { scan-assembler-times "stvx %?v?2,%?r?3" 1 } } */
+
+/* PR target/71733. */
+typedef __attribute__ ((altivec(vector__), aligned(16))) unsigned char vec_t;
+
+vec_t
+f1 (vec_t *dst)
+{
+ return dst[1];
+}
+
+void
+f2 (vec_t *dst, vec_t src)
+{
+ dst[1] = src;
+}