aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/p9-options-1.c
blob: 034a7f8012a5a2aafe100f339fbad14b010cc8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-options "-mdejagnu-cpu=power9 -mno-vsx" } */
/* { dg-require-effective-target powerpc_altivec } */

#include <altivec.h>

/* This program's "test for excess errors" demonstrates that combining
   the target options -mcpu=power9 and -mno-vsx does not
   result in an error.  A previous version of the compiler aborted
   with the error message:

      "power9-dform requires power9-vector."

   when these two options were used in combination.

   The newer version of the compiler, instead, automatically disables
   power9-dform when the -mno-vsx command-line option is
   specified.  */
int
test_any_equal (vector bool char *arg1_p, vector bool char *arg2_p)
{
  vector bool char arg_1 = *arg1_p;
  vector bool char arg_2 = *arg2_p;

  return vec_any_eq (arg_1, arg_2);
}