1 /* { dg-do compile } */
11 for (int i
= 0; i
< N
; ++i
)
12 x
[i
] >>= (y
[i
] < 30 ? y
[i
] : 30);
18 for (int i
= 0; i
< N
; ++i
)
19 x
[i
] >>= ((y
[i
] & 15) + 2);
25 for (int i
= 0; i
< N
; ++i
)
26 x
[i
] >>= (y
[i
] < 16 ? y
[i
] : 16);
32 for (int i
= 0; i
< N
; ++i
)
33 x
[i
] = 32768 >> ((y
[i
] & 15) + 3);
36 /* { dg-final { scan-tree-dump {can narrow to signed:31 without loss [^\n]+>>} "vect" } } */
37 /* { dg-final { scan-tree-dump {can narrow to signed:18 without loss [^\n]+>>} "vect" } } */
38 /* { dg-final { scan-tree-dump {can narrow to signed:17 without loss [^\n]+>>} "vect" } } */
39 /* { dg-final { scan-tree-dump {can narrow to unsigned:19 without loss [^\n]+>>} "vect" } } */