| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 |
/* { dg-final { check-function-bodies "**" "" } } */ |
| 4 |
/* PR target/113042 */ |
| 5 |
|
| 6 |
#pragma GCC target "+cssc" |
| 7 |
|
| 8 |
/* |
| 9 |
** h128: |
| 10 |
** ldp x([0-9]+), x([0-9]+), \[x0\] |
| 11 |
** cnt x([0-9]+), x([0-9]+) |
| 12 |
** cnt x([0-9]+), x([0-9]+) |
| 13 |
** add w0, w([0-9]+), w([0-9]+) |
| 14 |
** ret |
| 15 |
*/ |
| 16 |
|
| 17 |
|
| 18 |
unsigned h128 (const unsigned __int128 *a) { |
| 19 |
return __builtin_popcountg (a[0]); |
| 20 |
} |
| 21 |
|
| 22 |
/* popcount with CSSC should be split into 2 sections. */ |
| 23 |
/* { dg-final { scan-tree-dump-not "POPCOUNT " "optimized" } } */ |
| 24 |
/* { dg-final { scan-tree-dump-times " __builtin_popcount" 2 "optimized" } } */ |
| 25 |
|