Skip to content

Commit 0056937

Browse files
committed
Propagate StorageClass through OpBitcast
1 parent 660725d commit 0056937

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/rustc_codegen_spirv/src/spirv_type_constraints.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,10 @@ pub fn instruction_signatures(op: Op) -> Option<&'static [InstSig<'static>]> {
427427
Op::ConvertPtrToU | Op::SatConvertSToU | Op::SatConvertUToS | Op::ConvertUToPtr => {}
428428
Op::PtrCastToGeneric | Op::GenericCastToPtr => sig! { (Pointer(_, T)) -> Pointer(_, T) },
429429
Op::GenericCastToPtrExplicit => sig! { {S} (Pointer(_, T)) -> Pointer(S, T) },
430-
Op::Bitcast => {}
430+
Op::Bitcast => sig! {
431+
(Pointer(S, _)) -> Pointer(S, _) |
432+
(_) -> _
433+
},
431434

432435
// 3.37.12. Composite Instructions
433436
Op::VectorExtractDynamic => sig! { (Vector(T), _) -> T },

0 commit comments

Comments
 (0)