Open richardmembarth opened 2 years ago
LLVM annotates the private address space for amdgpu (but not for nvptx). This triggers the assertion "Calling a function with a bad signature!" when generating amdgpu code for the following code:
#[import(cc = "thorin")] fn amdgpu(_dev: i32, _grid: (i32, i32, i32), _block: (i32, i32, i32), _body: fn() -> ()) -> (); #[import(cc = "device")] fn foo(&A) -> (); struct A { a : i32, } fn noinline(a: &A) -> () { foo(a) } #[export] fn test(a: A) -> () { amdgpu(0, (1, 1, 1), (1, 1, 1), || { let ptr = &a; noinline(ptr); }); }
While (%"type 0x555555674340"*) is the parameter type for noinline, the argument has "type 0x555555674340" addrspace(5)*
(%"type 0x555555674340"*)
"type 0x555555674340" addrspace(5)*
LLVM annotates the private address space for amdgpu (but not for nvptx). This triggers the assertion "Calling a function with a bad signature!" when generating amdgpu code for the following code:
While
(%"type 0x555555674340"*)
is the parameter type for noinline, the argument has"type 0x555555674340" addrspace(5)*