Skip to content

Commit 84c9c4a

Browse files
kjetilkjekaKjetil Kjeka
authored and
Kjetil Kjeka
committedOct 26, 2023
NVPTX: Allow PassMode::Direct for ptx kernels for now
1 parent 8396efe commit 84c9c4a

File tree

1 file changed

+6
-1
lines changed
  • compiler/rustc_codegen_llvm/src

1 file changed

+6
-1
lines changed
 

‎compiler/rustc_codegen_llvm/src/abi.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,13 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
362362
// currently use this mode so we have to allow it -- but we absolutely
363363
// shouldn't let any more targets do that.
364364
// (Also see <https://github.com/rust-lang/rust/issues/115666>.)
365+
//
366+
// The unstable api `PtxKernel` also uses Direct for now.
367+
// It needs to switch to something else before stabilization can happen.
368+
// (Tracking issue abi_ptx: https://github.com/rust-lang/rust/issues/38788)
365369
assert!(
366-
matches!(&*cx.tcx.sess.target.arch, "wasm32" | "wasm64"),
370+
matches!(&*cx.tcx.sess.target.arch, "wasm32" | "wasm64")
371+
|| self.conv == Conv::PtxKernel,
367372
"`PassMode::Direct` for aggregates only allowed on wasm targets\nProblematic type: {:#?}",
368373
arg.layout,
369374
);

0 commit comments

Comments
 (0)
Please sign in to comment.