Open kjetilkjeka opened 1 year ago
@rustbot label +O-NVPTX
@RalfJung's https://github.com/rust-lang/rust/pull/117247#issuecomment-1782361541 explains the problem and why it is considered harmless enough to allow this exception until a better solution is found.
This comment is an important part of that argument as well.
Would it be possible to use PassMode::Cast
? Maybe by adapting the code at https://github.com/rust-lang/rust/blob/3d1dba830a564d1118361345d7ada47a05241f45/compiler/rustc_codegen_llvm/src/type_of.rs#L15-L140 (which is what effectively defines how PassMode::Direct
arguments are passed currently)
It produces seemingly correct behavior. However, it needs to be switched over to a less fragile ABI handling (https://github.com/rust-lang/compiler-team/issues/672) before stabilization may happen.
@RalfJung's comment explains the problem and why it is considered harmless enough to allow this exception until a better solution is found.