1 /* { dg-skip-if "missing optab for vectorization" { sparc*-*-* } } */
2 /* { dg-do run } */
3 /* { dg-additional-options "-O3 -save-temps -fdump-tree-dce -w" } */
4
5 #include <stdint.h>
6
7 __attribute__((noinline, noipa))
8 void fun1(uint32_t *x, int n)
9 {
10 for (int i = 0; i < (n & -16); i++)
11 x[i] = (x[i]&(~5)) == 0;
12 }
13
14 __attribute__((noinline, noipa, optimize("O1")))
15 void fun2(uint32_t *x, int n)
16 {
17 for (int i = 0; i < (n & -16); i++)
18 x[i] = (x[i]&(~5)) == 0;
19 }
20
21 #include "../bic-bitmask.h"
22
23 /* { dg-final { scan-tree-dump-not {<=\s*.+\{ 4294967289,.+\}} dce7 { target vect_int } } } */
24 /* { dg-final { scan-tree-dump {&\s*.+\{ 4294967290,.+\}} dce7 { target vect_int } } } */
25 /* { dg-final { scan-tree-dump-not {\s+bic\s+} dce7 { target { aarch64*-*-* } } } } */
26