1 /* { dg-do compile { target { powerpc64*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-options "-mcpu=power9 -O2" } */
5
6 /* Verify that we optimize vector1 = (vector2 == vector3) by not loading up
7 0/-1. */
8
9 vector int
test(vector int a,vector int b)10 test (vector int a, vector int b)
11 {
12 return a == b;
13 }
14
15 /* { dg-final { scan-assembler {\mvcmpequw\M} } } */
16 /* { dg-final { scan-assembler-not {\mxxspltib\M} } } */
17 /* { dg-final { scan-assembler-not {\mvspltisw\M} } } */
18 /* { dg-final { scan-assembler-not {\mxxlxor\M} } } */
19 /* { dg-final { scan-assembler-not {\mxxlxorc\M} } } */
20 /* { dg-final { scan-assembler-not {\mxxsel\M} } } */
21