blob: 6444f62187dce8014a61720a6e214c791e876bdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* Verify that overloaded built-ins for vec_abs with int
inputs produce the right results when -mcpu=power9 is specified. */
/* { dg-do compile } */
/* { dg-options "-maltivec -O2 -mdejagnu-cpu=power9 -mvsx -fwrapv" } */
/* { dg-require-effective-target powerpc_vsx } */
#include <altivec.h>
vector signed int
test1 (vector signed int x)
{
return vec_abs (x);
}
/* { dg-final { scan-assembler-times "vnegw" 1 } } */
/* { dg-final { scan-assembler-times "vmaxsw" 1 } } */
|