diff options
| author | Kjetil Kjeka <kjetilkjeka@gmail.com> | 2023-10-26 21:43:43 +0200 |
|---|---|---|
| committer | Kjetil Kjeka <kjetil@muybridge.com> | 2023-10-26 21:57:19 +0200 |
| commit | 84c9c4aca7665e40986392845406a1b7524da07f (patch) | |
| tree | 9e94fafc79c381ccad4c35e8c6d0a352a552f2d8 /compiler/rustc_codegen_llvm/src | |
| parent | 8396efecf7d30ca9f7edcf76aba2ea388300f6ab (diff) | |
| download | rust-84c9c4aca7665e40986392845406a1b7524da07f.tar.gz rust-84c9c4aca7665e40986392845406a1b7524da07f.zip | |
NVPTX: Allow PassMode::Direct for ptx kernels for now
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/abi.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index 9e834b83df4..6bface44a63 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -362,8 +362,13 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { // currently use this mode so we have to allow it -- but we absolutely // shouldn't let any more targets do that. // (Also see <https://github.com/rust-lang/rust/issues/115666>.) + // + // The unstable api `PtxKernel` also uses Direct for now. + // It needs to switch to something else before stabilization can happen. + // (Tracking issue abi_ptx: https://github.com/rust-lang/rust/issues/38788) assert!( - matches!(&*cx.tcx.sess.target.arch, "wasm32" | "wasm64"), + matches!(&*cx.tcx.sess.target.arch, "wasm32" | "wasm64") + || self.conv == Conv::PtxKernel, "`PassMode::Direct` for aggregates only allowed on wasm targets\nProblematic type: {:#?}", arg.layout, ); |
