Conversation
| _args: &[OperandRef<'tcx, Self::Value>], | ||
| _is_cleanup: bool, | ||
| ) -> Self::Value { | ||
| bug!("LLVM intrinsic call not supported in SPIR-V backend: {instance:?}") |
There was a problem hiding this comment.
I think we want to use this rather than our own home-grown replacements, but didn't want to do it in this PR.
14cdf92 to
6434ab8
Compare
|
|
|
Tried to update with a patched Details |
|
Cool, I'll take a look. There were some changes in this area. |
2fe48e0 to
db063f6
Compare
|
@nazar-pc I think what you saw should be fixed. |
|
Yes, clippy is happy now, tests are passing too |
| @@ -86,6 +101,12 @@ pub(crate) fn provide(providers: &mut Providers) { | |||
| arg.mode = PassMode::Ignore; | |||
| } | |||
|
|
|||
| // SPIR-V backend lowers arguments by-value and cannot handle | |||
| // backend-specific indirection/casts at this layer. | |||
| if matches!(arg.mode, PassMode::Cast { .. } | PassMode::Indirect { .. }) { | |||
| arg.mode = PassMode::Direct(ArgAttributes::new()); | |||
| } | |||
There was a problem hiding this comment.
There's an make_direct_deprecated above this here. Seems to be duplication?
There was a problem hiding this comment.
It doesn't seem to be removed, could you check again?
Also note that make_direct_deprecated will panic if it uses PassMode::Cast, so this appears to be unreachable.
There was a problem hiding this comment.
Whoops, I pushed to my fork rather than the upstream branch. Just pushed the commit. Yeah, this is unreachable anyway.
Update the pinned workspace toolchain to rustc 1.96.0-nightly (1d8897a4e 2026-03-13) and keep REQUIRED_RUST_TOOLCHAIN in sync. Mirror the current rustc_codegen_ssa crate-attribute header in lib.rs, keep rustc_codegen_spirv-specific lint allowances outside that mirrored block, and drop the now-unneeded bootstrap-only header filtering from build.rs.
Use exact rust_gpu attribute paths with get_attrs_by_path, let AggregatedSpirvAttributes parse filtered iterators directly, and replace the manual debug filename arena allocation with DroplessArena::alloc_str. Also port the rustc-private API drift in this nightly by importing assert_matches from std, using rustc_span::Spanned directly, and renaming BackendRepr::ScalableVector to SimdScalableVector.
Keep the existing runtime-array reification path for const pointer bitcasts, but report a specific zombie reason when the backing allocation size is not a multiple of the runtime-array element size instead of silently falling through to the generic const_bitcast error.
This disassembly test only cares about the rotate lowering pattern, not source line tables. Strip OpLine records entirely so line-number drift across toolchains does not require reblessing the test.
|
cc @Firestar99 for some testing |
This is handled above.
|
@Firestar99 did you get a chance to test this? |
Add a UI compile-fail test for casting a 3-byte constant allocation to `*const RuntimeArray<u16>`. This exercises the existing trailing-bytes diagnostic for unsupported unsized constants and guards the review concern that this shape must fail instead of silently lowering.
fee1-dead
left a comment
There was a problem hiding this comment.
LGTM, had one last nit, otherwise this is ready to go and feel free to merge after CI green and testing (cc @Firestar99?)!
| && let Some(init) = self.try_read_from_const_alloc(alloc, pointee) | ||
| { | ||
| return self.static_addr_of(init, alloc.inner().align, None); | ||
| if let Some(init) = self.try_read_from_const_alloc(alloc, pointee) { |
There was a problem hiding this comment.
nit: should move back to the let chain instead of putting another check inside.
The generic unsized constant reader already handles `RuntimeArray` constants, including the trailing-bytes error case covered by the new compile-fail test. Keep `const_bitcast` on the direct `try_read_from_const_alloc` path instead of carrying a second fallback that no longer changes behavior.
ed2c27e to
3cce05f
Compare
|
Looks like cargo-gpu needs an update to work with this branch... I'll have a look tomorrow (and properly review this) |
Requires #542