| 1 |
/* { dg-do assemble } */ |
| 2 |
/* { dg-options {-O0 -mno-soft-stack} } */ |
| 3 |
/* { dg-additional-options -march=sm_30 } */ |
| 4 |
/* { dg-additional-options -mfake-ptx-alloca } */ |
| 5 |
/* { dg-additional-options -save-temps } */ |
| 6 |
/* { dg-final { check-function-bodies {** } {} } } */ |
| 7 |
|
| 8 |
void sink(void *); |
| 9 |
|
| 10 |
void f(int s) |
| 11 |
{ |
| 12 |
char a[s]; |
| 13 |
/* { dg-bogus {sorry, unimplemented: dynamic stack allocation not supported} {} { target *-*-* } .-1 } */ |
| 14 |
sink(a); |
| 15 |
} |
| 16 |
/* |
| 17 |
** f: |
| 18 |
** ... |
| 19 |
** cvt\.s64\.s32 (%r[0-9]+), (%r[0-9]+); |
| 20 |
** mov\.u64 (%r[0-9]+), 16; |
| 21 |
** add\.u64 (%r[0-9]+), \3, -1; |
| 22 |
** add\.u64 (%r[0-9]+), \1, \4; |
| 23 |
** div\.u64 (%r[0-9]+), \5, 16; |
| 24 |
** mul\.lo\.u64 (%r[0-9]+), \6, 16; |
| 25 |
** call \((%r[0-9]+)\), __GCC_nvptx__PTX_alloca_not_supported, \(\7\); |
| 26 |
** ... |
| 27 |
*/ |
| 28 |
|
| 29 |
/* { dg-final { scan-assembler-times {(?n)^\.extern \.func \(\.param\.u64 %value_out\) __GCC_nvptx__PTX_alloca_not_supported \(\.param\.u64 %in_ar0\);$} 1 } } */ |