1 // { dg-do compile { target nvptx-*-* } }
2 // { dg-additional-options "-m64" }
4 // Check NRV optimization doesn't change the PTX prototypes.
10 // { dg-final { scan-assembler-times ".weak .func _ZN1AC1Ev \\(.param.u64 %in_ar0\\)(?:;|\[\r\n\]+\{)" 2 } }
12 A (const A & o) { d = o.d; }
19 // { dg-final { scan-assembler ".extern .func _ZN5unopt3fooEv \\(.param.u64 %in_ar0\\);" } }
20 A __attribute__ ((__optimize__ ("O0"))) foo ();
22 // { dg-final { scan-assembler-times ".visible .func _ZN5unopt3barEv \\(.param.u64 %in_ar0\\)(?:;|\[\r\n\]+\{)" 2 } }
23 A __attribute__ ((__optimize__ ("O0"), noinline)) bar()
29 // { dg-final { scan-assembler-times ".visible .func _ZN5unopt3bazEv \\(.param.u64 %in_ar0\\)(?:;|\[\r\n\]+\{)" 2 } }
30 A __attribute__ ((__optimize__ ("O0"), noinline)) baz ()
35 void __attribute__ ((__optimize__ ("O0"), noinline)) quux ()
46 // { dg-final { scan-assembler ".extern .func _ZN3opt3fooEv \\(.param.u64 %in_ar0\\);" } }
47 A __attribute__ ((__optimize__ ("O2"), noinline)) foo ();
49 // { dg-final { scan-assembler-times ".visible .func _ZN3opt3barEv \\(.param.u64 %in_ar0\\)(?:;|\[\r\n\]+\{)" 2 } }
50 A __attribute__ ((__optimize__ ("O2"), noinline)) bar()
56 // { dg-final { scan-assembler-times ".visible .func _ZN3opt3bazEv \\(.param.u64 %in_ar0\\)(?:;|\[\r\n\]+\{)" 2 } }
57 A __attribute__ ((__optimize__ ("O2"))) baz ()
62 void __attribute__ ((__optimize__ ("O2"), noinline)) quux ()
70 // Make sure we're not trying return a return value anywhere.
71 // { dg-final { scan-assembler-not "st.param.u64\[\t \]*\\\[%out_retval\\\], %\[_a-z0-9\]*;" } }