Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-constvolatile.c
blob07cbd5c291ad020016deaf7dc14baa6ff04c658d
1 /* Test that const and volatile qualifiers can mix on vec_mul operands. */
3 /* { dg-do compile } */
4 /* { dg-require-effective-target powerpc_altivec_ok } */
5 /* { dg-options "-maltivec -mvsx" } */
7 #include <altivec.h>
9 void P() {
10 const volatile vector float cvva = vec_splats(0.00187682f);
11 volatile vector float vva = vec_splats(0.00187682f);
12 const vector float cva = vec_splats(0.00187682f);
13 vector float va = vec_splats(0.00187682f);
14 vector float dx = {1.0f, 2.0f, 3.0f, 4.0f};
16 vector float X1m0 = vec_mul(va, va);
17 vector float X2m0 = vec_mul(va, dx);
18 vector float X3m0 = vec_mul(dx, va);
20 vector float X1m1 = vec_mul(cva, cva);
21 vector float X2m1 = vec_mul(cva, dx);
22 vector float X3m1 = vec_mul(dx, cva);
24 vector float Y1m2 = vec_mul(vva, vva);
25 vector float Y2m2 = vec_mul(vva, dx);
26 vector float Y3m2 = vec_mul(dx, vva);
28 vector float X1m3 = vec_mul(cvva, cvva);
29 vector float X2m3 = vec_mul(cvva, dx);
30 vector float X3m3 = vec_mul(dx, cvva);