PR rtl-optimization/88018
[official-gcc.git] / gcc / testsuite / c-c++-common / scal-to-vec2.c
blobe2c93eedd6c5a068a785d2d84d87edad3f7dec4b
1 /* { dg-do compile } */
2 /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
3 /* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
4 /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
5 /* Ignore warning on some powerpc-ibm-aix configurations. */
6 /* { dg-prune-output "non-standard ABI extension" } */
8 /* Test for C_MAYBE_CONST are folded correctly when
9 expanding an expression to vector. */
11 int f(void);
12 unsigned int g(void);
13 unsigned int h;
15 typedef unsigned int vec __attribute__((vector_size(16)));
17 vec i;
20 vec fv1(void) { return i + (h ? f() : g()); }
21 vec fv2(void) { return (h ? f() : g()) + i; }