1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_p8vector_ok } */
4 /* { dg-options "-mdejagnu-cpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
15 #define ATTR_ALIGN __attribute__((__aligned__(ALIGN)))
19 #define TYPE unsigned int
22 TYPE in1
[SIZE
] ATTR_ALIGN
;
23 TYPE in2
[SIZE
] ATTR_ALIGN
;
24 TYPE eqv
[SIZE
] ATTR_ALIGN
;
25 TYPE nand1
[SIZE
] ATTR_ALIGN
;
26 TYPE nand2
[SIZE
] ATTR_ALIGN
;
27 TYPE orc1
[SIZE
] ATTR_ALIGN
;
28 TYPE orc2
[SIZE
] ATTR_ALIGN
;
35 for (i
= 0; i
< SIZE
; i
++)
37 eqv
[i
] = ~(in1
[i
] ^ in2
[i
]);
46 for (i
= 0; i
< SIZE
; i
++)
48 nand1
[i
] = ~(in1
[i
] & in2
[i
]);
57 for (i
= 0; i
< SIZE
; i
++)
59 nand2
[i
] = (~in1
[i
]) | (~in2
[i
]);
68 for (i
= 0; i
< SIZE
; i
++)
70 orc1
[i
] = (~in1
[i
]) | in2
[i
];
79 for (i
= 0; i
< SIZE
; i
++)
81 orc1
[i
] = in1
[i
] | (~in2
[i
]);
85 /* { dg-final { scan-assembler-times "xxleqv" 1 } } */
86 /* { dg-final { scan-assembler-times "xxlnand" 2 } } */
87 /* { dg-final { scan-assembler-times "xxlorc" 2 } } */