Debian Codegraph @

gcc/testsuite/gcc.target/nvptx/stack_frame-1.c

raw
1 /* GCC used to emit an unused stack frame. */
2
3 /* { dg-do assemble } */
4 /* { dg-options {-O2 -mno-soft-stack} } */
5 /* { dg-additional-options -save-temps } */
6 /* { dg-final { check-function-bodies {** } {} } } */
7
8 /* Greatly reduced from libgcc code, where this issue was visible for
9 '_divdi3.o:__divti3', '_divmoddi4.o:__divmodti4', '_moddi3.o:__modti3',
10 '_udivdi3.o:__udivti3', '_udivmoddi4.o:__udivmodti4',
11 '_umoddi3.o:__umodti3'. */
12
13 int f (int n)
14 {
15 const union {
16 struct { long low, high; };
17 __int128 ll;
18 } ww = {{.low = n, .high = 0}};
19 return (int) ww.ll;
20 }
21 /*
22 ** f:
23 ** \.visible \.func \(\.param\.u32 %value_out\) f \(\.param\.u32 %in_ar0\)
24 ** {
25 ** \.reg\.u32 %value;
26 ** \.reg\.u32 %ar0;
27 ** ld\.param\.u32 %ar0, \[%in_ar0\];
28 ** mov\.u32 %value, %ar0;
29 ** st\.param\.u32 \[%value_out\], %value;
30 ** ret;
31 */