@@ -50,8 +50,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
50
50
| "bitreverse"
51
51
=> {
52
52
let [ op] = check_arg_count ( args) ?;
53
- let ( op, op_len) = this. operand_to_simd ( op) ?;
54
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
53
+ let ( op, op_len) = this. project_to_simd ( op) ?;
54
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
55
55
56
56
assert_eq ! ( dest_len, op_len) ;
57
57
@@ -200,9 +200,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
200
200
use mir:: BinOp ;
201
201
202
202
let [ left, right] = check_arg_count ( args) ?;
203
- let ( left, left_len) = this. operand_to_simd ( left) ?;
204
- let ( right, right_len) = this. operand_to_simd ( right) ?;
205
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
203
+ let ( left, left_len) = this. project_to_simd ( left) ?;
204
+ let ( right, right_len) = this. project_to_simd ( right) ?;
205
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
206
206
207
207
assert_eq ! ( dest_len, left_len) ;
208
208
assert_eq ! ( dest_len, right_len) ;
@@ -291,10 +291,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
291
291
}
292
292
"fma" => {
293
293
let [ a, b, c] = check_arg_count ( args) ?;
294
- let ( a, a_len) = this. operand_to_simd ( a) ?;
295
- let ( b, b_len) = this. operand_to_simd ( b) ?;
296
- let ( c, c_len) = this. operand_to_simd ( c) ?;
297
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
294
+ let ( a, a_len) = this. project_to_simd ( a) ?;
295
+ let ( b, b_len) = this. project_to_simd ( b) ?;
296
+ let ( c, c_len) = this. project_to_simd ( c) ?;
297
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
298
298
299
299
assert_eq ! ( dest_len, a_len) ;
300
300
assert_eq ! ( dest_len, b_len) ;
@@ -345,7 +345,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
345
345
use mir:: BinOp ;
346
346
347
347
let [ op] = check_arg_count ( args) ?;
348
- let ( op, op_len) = this. operand_to_simd ( op) ?;
348
+ let ( op, op_len) = this. project_to_simd ( op) ?;
349
349
350
350
let imm_from_bool =
351
351
|b| ImmTy :: from_scalar ( Scalar :: from_bool ( b) , this. machine . layouts . bool ) ;
@@ -408,7 +408,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
408
408
use mir:: BinOp ;
409
409
410
410
let [ op, init] = check_arg_count ( args) ?;
411
- let ( op, op_len) = this. operand_to_simd ( op) ?;
411
+ let ( op, op_len) = this. project_to_simd ( op) ?;
412
412
let init = this. read_immediate ( init) ?;
413
413
414
414
let mir_op = match intrinsic_name {
@@ -426,10 +426,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
426
426
}
427
427
"select" => {
428
428
let [ mask, yes, no] = check_arg_count ( args) ?;
429
- let ( mask, mask_len) = this. operand_to_simd ( mask) ?;
430
- let ( yes, yes_len) = this. operand_to_simd ( yes) ?;
431
- let ( no, no_len) = this. operand_to_simd ( no) ?;
432
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
429
+ let ( mask, mask_len) = this. project_to_simd ( mask) ?;
430
+ let ( yes, yes_len) = this. project_to_simd ( yes) ?;
431
+ let ( no, no_len) = this. project_to_simd ( no) ?;
432
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
433
433
434
434
assert_eq ! ( dest_len, mask_len) ;
435
435
assert_eq ! ( dest_len, yes_len) ;
@@ -448,9 +448,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
448
448
// Variant of `select` that takes a bitmask rather than a "vector of bool".
449
449
"select_bitmask" => {
450
450
let [ mask, yes, no] = check_arg_count ( args) ?;
451
- let ( yes, yes_len) = this. operand_to_simd ( yes) ?;
452
- let ( no, no_len) = this. operand_to_simd ( no) ?;
453
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
451
+ let ( yes, yes_len) = this. project_to_simd ( yes) ?;
452
+ let ( no, no_len) = this. project_to_simd ( no) ?;
453
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
454
454
let bitmask_len = dest_len. next_multiple_of ( 8 ) ;
455
455
if bitmask_len > 64 {
456
456
throw_unsup_format ! (
@@ -522,7 +522,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
522
522
// Converts a "vector of bool" into a bitmask.
523
523
"bitmask" => {
524
524
let [ op] = check_arg_count ( args) ?;
525
- let ( op, op_len) = this. operand_to_simd ( op) ?;
525
+ let ( op, op_len) = this. project_to_simd ( op) ?;
526
526
let bitmask_len = op_len. next_multiple_of ( 8 ) ;
527
527
if bitmask_len > 64 {
528
528
throw_unsup_format ! (
@@ -570,8 +570,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
570
570
}
571
571
"cast" | "as" | "cast_ptr" | "expose_provenance" | "with_exposed_provenance" => {
572
572
let [ op] = check_arg_count ( args) ?;
573
- let ( op, op_len) = this. operand_to_simd ( op) ?;
574
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
573
+ let ( op, op_len) = this. project_to_simd ( op) ?;
574
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
575
575
576
576
assert_eq ! ( dest_len, op_len) ;
577
577
@@ -627,9 +627,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
627
627
}
628
628
"shuffle_generic" => {
629
629
let [ left, right] = check_arg_count ( args) ?;
630
- let ( left, left_len) = this. operand_to_simd ( left) ?;
631
- let ( right, right_len) = this. operand_to_simd ( right) ?;
632
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
630
+ let ( left, left_len) = this. project_to_simd ( left) ?;
631
+ let ( right, right_len) = this. project_to_simd ( right) ?;
632
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
633
633
634
634
let index = generic_args[ 2 ]
635
635
. expect_const ( )
@@ -662,15 +662,15 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
662
662
}
663
663
"shuffle" => {
664
664
let [ left, right, index] = check_arg_count ( args) ?;
665
- let ( left, left_len) = this. operand_to_simd ( left) ?;
666
- let ( right, right_len) = this. operand_to_simd ( right) ?;
667
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
665
+ let ( left, left_len) = this. project_to_simd ( left) ?;
666
+ let ( right, right_len) = this. project_to_simd ( right) ?;
667
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
668
668
669
669
// `index` is an array or a SIMD type
670
670
let ( index, index_len) = match index. layout . ty . kind ( ) {
671
671
// FIXME: remove this once `index` must always be a SIMD vector.
672
- ty:: Array ( ..) => ( index. assert_mem_place ( ) , index. len ( this) ?) ,
673
- _ => this. operand_to_simd ( index) ?,
672
+ ty:: Array ( ..) => ( index. clone ( ) , index. len ( this) ?) ,
673
+ _ => this. project_to_simd ( index) ?,
674
674
} ;
675
675
676
676
assert_eq ! ( left_len, right_len) ;
@@ -699,10 +699,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
699
699
}
700
700
"gather" => {
701
701
let [ passthru, ptrs, mask] = check_arg_count ( args) ?;
702
- let ( passthru, passthru_len) = this. operand_to_simd ( passthru) ?;
703
- let ( ptrs, ptrs_len) = this. operand_to_simd ( ptrs) ?;
704
- let ( mask, mask_len) = this. operand_to_simd ( mask) ?;
705
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
702
+ let ( passthru, passthru_len) = this. project_to_simd ( passthru) ?;
703
+ let ( ptrs, ptrs_len) = this. project_to_simd ( ptrs) ?;
704
+ let ( mask, mask_len) = this. project_to_simd ( mask) ?;
705
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
706
706
707
707
assert_eq ! ( dest_len, passthru_len) ;
708
708
assert_eq ! ( dest_len, ptrs_len) ;
@@ -725,9 +725,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
725
725
}
726
726
"scatter" => {
727
727
let [ value, ptrs, mask] = check_arg_count ( args) ?;
728
- let ( value, value_len) = this. operand_to_simd ( value) ?;
729
- let ( ptrs, ptrs_len) = this. operand_to_simd ( ptrs) ?;
730
- let ( mask, mask_len) = this. operand_to_simd ( mask) ?;
728
+ let ( value, value_len) = this. project_to_simd ( value) ?;
729
+ let ( ptrs, ptrs_len) = this. project_to_simd ( ptrs) ?;
730
+ let ( mask, mask_len) = this. project_to_simd ( mask) ?;
731
731
732
732
assert_eq ! ( ptrs_len, value_len) ;
733
733
assert_eq ! ( ptrs_len, mask_len) ;
@@ -745,10 +745,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
745
745
}
746
746
"masked_load" => {
747
747
let [ mask, ptr, default] = check_arg_count ( args) ?;
748
- let ( mask, mask_len) = this. operand_to_simd ( mask) ?;
748
+ let ( mask, mask_len) = this. project_to_simd ( mask) ?;
749
749
let ptr = this. read_pointer ( ptr) ?;
750
- let ( default, default_len) = this. operand_to_simd ( default) ?;
751
- let ( dest, dest_len) = this. mplace_to_simd ( dest) ?;
750
+ let ( default, default_len) = this. project_to_simd ( default) ?;
751
+ let ( dest, dest_len) = this. project_to_simd ( dest) ?;
752
752
753
753
assert_eq ! ( dest_len, mask_len) ;
754
754
assert_eq ! ( dest_len, default_len) ;
@@ -772,9 +772,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
772
772
}
773
773
"masked_store" => {
774
774
let [ mask, ptr, vals] = check_arg_count ( args) ?;
775
- let ( mask, mask_len) = this. operand_to_simd ( mask) ?;
775
+ let ( mask, mask_len) = this. project_to_simd ( mask) ?;
776
776
let ptr = this. read_pointer ( ptr) ?;
777
- let ( vals, vals_len) = this. operand_to_simd ( vals) ?;
777
+ let ( vals, vals_len) = this. project_to_simd ( vals) ?;
778
778
779
779
assert_eq ! ( mask_len, vals_len) ;
780
780
0 commit comments