-
- Downloads
nvptx: Partial support for aliases to aliases.
For the following test (adapted from pr96390.c): __attribute__((noipa)) int foo () { return 42; } int bar () __attribute__((alias ("foo"))); int baz () __attribute__((alias ("bar"))); int main () { int n; #pragma omp target map(from:n) n = baz (); return n; } gcc emits following ptx for baz: .visible .func (.param.u32 %value_out) bar; .alias bar,foo; .visible .func (.param.u32 %value_out) baz; .alias baz,bar; which is incorrect since PTX requires aliasee to be a defined function. The patch instead uses cgraph_node::get(name)->ultimate_alias_target, which generates the following PTX: .visible .func (.param.u32 %value_out) baz; .alias baz,foo; gcc/ChangeLog: PR target/104957 * config/nvptx/nvptx.cc (nvptx_asm_output_def_from_decls): Use cgraph_node::get(name)->ultimate_alias_target instead of value. gcc/testsuite/ChangeLog: PR target/104957 * gcc.target/nvptx/alias-to-alias-1.c: Adjust. Signed-off-by:Prathamesh Kulkarni <prathameshk@nvidia.com> Co-authored-by:
Thomas Schwinge <tschwinge@baylibre.com>
Loading
Please register or sign in to comment