@@ -14,7 +14,7 @@ use crate::builder_spirv::{BuilderCursor, SpirvValue, SpirvValueExt};
14
14
use crate :: codegen_cx:: CodegenCx ;
15
15
use crate :: spirv_type:: SpirvType ;
16
16
use rspirv:: spirv:: { self , Word } ;
17
- use rustc_codegen_ssa:: mir:: operand:: OperandValue ;
17
+ use rustc_codegen_ssa:: mir:: operand:: { OperandRef , OperandValue } ;
18
18
use rustc_codegen_ssa:: mir:: place:: PlaceRef ;
19
19
use rustc_codegen_ssa:: traits:: {
20
20
AbiBuilderMethods , ArgAbiMethods , BackendTypes , BuilderMethods , CoverageInfoBuilderMethods ,
@@ -301,7 +301,7 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
301
301
match arg_abi. mode {
302
302
PassMode :: Ignore => { }
303
303
PassMode :: Direct ( _) => {
304
- OperandValue :: Immediate ( next ( self , idx) ) . store ( self , dst) ;
304
+ self . store_arg ( arg_abi , next ( self , idx) , dst) ;
305
305
}
306
306
PassMode :: Pair ( ..) => {
307
307
OperandValue :: Pair ( next ( self , idx) , next ( self , idx) ) . store ( self , dst) ;
@@ -323,7 +323,9 @@ impl<'a, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'tcx> {
323
323
match arg_abi. mode {
324
324
PassMode :: Ignore => { }
325
325
PassMode :: Direct ( _) | PassMode :: Pair ( ..) => {
326
- OperandValue :: Immediate ( val) . store ( self , dst) ;
326
+ OperandRef :: from_immediate_or_packed_pair ( self , val, arg_abi. layout )
327
+ . val
328
+ . store ( self , dst) ;
327
329
}
328
330
PassMode :: Cast { .. } | PassMode :: Indirect { .. } => span_bug ! (
329
331
self . span( ) ,
0 commit comments