2 /* { dg-options "-O3 -fwrapv" } */
3 /* Make sure vectorized absolute difference behaves same as scalar version. */
6 signed char a
[] = {-100, -100, -100, -100,-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 };
7 signed char b
[] = { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
11 __attribute__ ((noinline
,noipa
))
15 for (int i
= 0; i
< N
; i
++)
17 signed char diff
= b
[i
] - a
[i
];
18 out
[i
] = diff
> 0 ? diff
: -diff
;
24 __attribute__ ((noinline
,noipa
))
28 for (int i
= 0; i
< N
; i
++)
31 signed char diff
= b
[i
] - a
[i
];
32 out2
[i
] = diff
> 0 ? diff
: -diff
;
41 for (int i
= 0; i
< N
; i
++)
42 if (out
[i
] != out2
[i
])