@@ -22,7 +22,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
22
22
fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
23
23
intrinsic : Symbol ,
24
24
generic_args : GenericArgsRef < ' tcx > ,
25
- args : & [ mir:: Operand < ' tcx > ] ,
25
+ args : & [ Spanned < mir:: Operand < ' tcx > > ] ,
26
26
ret : CPlace < ' tcx > ,
27
27
target : BasicBlock ,
28
28
span : Span ,
@@ -122,8 +122,8 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
122
122
let [ x, y] = args else {
123
123
bug ! ( "wrong number of args for intrinsic {intrinsic}" ) ;
124
124
} ;
125
- let x = codegen_operand ( fx, x ) ;
126
- let y = codegen_operand ( fx, y ) ;
125
+ let x = codegen_operand ( fx, & x . node ) ;
126
+ let y = codegen_operand ( fx, & y . node ) ;
127
127
128
128
if !x. layout ( ) . ty . is_simd ( ) {
129
129
report_simd_type_validation_error ( fx, intrinsic, span, x. layout ( ) . ty ) ;
@@ -173,8 +173,8 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
173
173
bug ! ( "wrong number of args for intrinsic {intrinsic}" ) ;
174
174
}
175
175
} ;
176
- let x = codegen_operand ( fx, x ) ;
177
- let y = codegen_operand ( fx, y ) ;
176
+ let x = codegen_operand ( fx, & x . node ) ;
177
+ let y = codegen_operand ( fx, & y . node ) ;
178
178
179
179
if !x. layout ( ) . ty . is_simd ( ) {
180
180
report_simd_type_validation_error ( fx, intrinsic, span, x. layout ( ) . ty ) ;
@@ -183,7 +183,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
183
183
184
184
// Make sure this is actually an array, since typeck only checks the length-suffixed
185
185
// version of this intrinsic.
186
- let idx_ty = fx. monomorphize ( idx. ty ( fx. mir , fx. tcx ) ) ;
186
+ let idx_ty = fx. monomorphize ( idx. node . ty ( fx. mir , fx. tcx ) ) ;
187
187
let n: u16 = match idx_ty. kind ( ) {
188
188
ty:: Array ( ty, len) if matches ! ( ty. kind( ) , ty:: Uint ( ty:: UintTy :: U32 ) ) => len
189
189
. try_eval_target_usize ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) )
@@ -216,7 +216,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
216
216
217
217
let indexes = {
218
218
use rustc_middle:: mir:: interpret:: * ;
219
- let idx_const = match idx {
219
+ let idx_const = match & idx. node {
220
220
Operand :: Constant ( const_) => crate :: constant:: eval_mir_constant ( fx, const_) . 0 ,
221
221
Operand :: Copy ( _) | Operand :: Move ( _) => unreachable ! ( "{idx:?}" ) ,
222
222
} ;
@@ -270,12 +270,12 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
270
270
bug ! ( "wrong number of args for intrinsic {intrinsic}" ) ;
271
271
}
272
272
} ;
273
- let base = codegen_operand ( fx, base) ;
274
- let val = codegen_operand ( fx, val) ;
273
+ let base = codegen_operand ( fx, & base. node ) ;
274
+ let val = codegen_operand ( fx, & val. node ) ;
275
275
276
276
// FIXME validate
277
277
let idx_const = if let Some ( idx_const) =
278
- crate :: constant:: mir_operand_get_const_val ( fx, idx)
278
+ crate :: constant:: mir_operand_get_const_val ( fx, & idx. node )
279
279
{
280
280
idx_const
281
281
} else {
@@ -305,15 +305,15 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
305
305
bug ! ( "wrong number of args for intrinsic {intrinsic}" ) ;
306
306
}
307
307
} ;
308
- let v = codegen_operand ( fx, v ) ;
308
+ let v = codegen_operand ( fx, & v . node ) ;
309
309
310
310
if !v. layout ( ) . ty . is_simd ( ) {
311
311
report_simd_type_validation_error ( fx, intrinsic, span, v. layout ( ) . ty ) ;
312
312
return ;
313
313
}
314
314
315
315
let idx_const = if let Some ( idx_const) =
316
- crate :: constant:: mir_operand_get_const_val ( fx, idx)
316
+ crate :: constant:: mir_operand_get_const_val ( fx, & idx. node )
317
317
{
318
318
idx_const
319
319
} else {
0 commit comments