| 1 |
/* { dg-do assemble } */ |
| 2 |
/* { dg-options {-O0 -mno-soft-stack} } */ |
| 3 |
/* { dg-add-options nvptx_alloca_ptx } */ |
| 4 |
/* { dg-additional-options -save-temps } */ |
| 5 |
/* { dg-final { check-function-bodies {**} {} } } */ |
| 6 |
|
| 7 |
void sink(void *); |
| 8 |
|
| 9 |
void f(int s) |
| 10 |
{ |
| 11 |
char a[s]; |
| 12 |
sink(a); |
| 13 |
} |
| 14 |
/* |
| 15 |
** f: |
| 16 |
** ... |
| 17 |
** cvt\.s64\.s32 (%r[0-9]+), (%r[0-9]+); |
| 18 |
** mov\.u64 (%r[0-9]+), 16; |
| 19 |
** add\.u64 (%r[0-9]+), \3, -1; |
| 20 |
** add\.u64 (%r[0-9]+), \1, \4; |
| 21 |
** div\.u64 (%r[0-9]+), \5, 16; |
| 22 |
** mul\.lo\.u64 (%r[0-9]+), \6, 16; |
| 23 |
** { |
| 24 |
** \.reg\.u64 (%r[0-9]+)_local; |
| 25 |
** alloca\.u64 \8_local, \7; |
| 26 |
** cvta\.local\.u64 \8, \8_local; |
| 27 |
** } |
| 28 |
** ... |
| 29 |
*/ |