summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vector-compare-2.c
blob: 8cbcf0787c4762199e233f5a0bf84f698c1fbe75 (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
28
/* { dg-do compile } */   
/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */

/* Test if C_MAYBE_CONST are folded correctly when 
   creating VEC_COND_EXPR.  */

typedef int vec __attribute__((vector_size(16)));

vec i,j;
extern vec a, b, c;

extern int p, q, z;
extern vec foo (int);

vec 
foo (int x)
{
  return  foo (p ? q :z) > a;
}

vec 
bar (int x)
{
  return  b > foo (p ? q :z);
}