Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/cond_convert_8.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -moverride=sve_width=256 -fdump-tree-optimized" } */
3 /* PR tree-optimization/111002 */
4
5 /* We should be able to remove the neg. */
6
7 void __attribute__ ((noipa))
8 f (int *__restrict r,
9 int *__restrict a,
10 short *__restrict pred)
11 {
12 for (int i = 0; i < 1024; ++i)
13 r[i] = pred[i] != 0 ? -1 : 0;
14 }
15
16
17 /* { dg-final { scan-assembler-times {\tmov\tz[0-9]+\.h, p[0-7]+/z, #-1} 1 } } */
18 /* { dg-final { scan-assembler-not {\tmov\tz[0-9]+\.[hs], p[0-7]+/z, #1} } } */
19
20 /* { dg-final { scan-tree-dump-not "VIEW_CONVERT_EXPR " "optimized" } } */
21 /* { dg-final { scan-tree-dump-not " = -" "optimized" } } */
22 /* { dg-final { scan-tree-dump-not " = \\\(vector" "optimized" } } */