@@ -50,8 +50,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
5050 | "bitreverse"
5151 => {
5252 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) ?;
5555
5656 assert_eq ! ( dest_len, op_len) ;
5757
@@ -200,9 +200,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
200200 use mir:: BinOp ;
201201
202202 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) ?;
206206
207207 assert_eq ! ( dest_len, left_len) ;
208208 assert_eq ! ( dest_len, right_len) ;
@@ -291,10 +291,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
291291 }
292292 "fma" => {
293293 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) ?;
298298
299299 assert_eq ! ( dest_len, a_len) ;
300300 assert_eq ! ( dest_len, b_len) ;
@@ -345,7 +345,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
345345 use mir:: BinOp ;
346346
347347 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) ?;
349349
350350 let imm_from_bool =
351351 |b| ImmTy :: from_scalar ( Scalar :: from_bool ( b) , this. machine . layouts . bool ) ;
@@ -408,7 +408,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
408408 use mir:: BinOp ;
409409
410410 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) ?;
412412 let init = this. read_immediate ( init) ?;
413413
414414 let mir_op = match intrinsic_name {
@@ -426,10 +426,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
426426 }
427427 "select" => {
428428 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) ?;
433433
434434 assert_eq ! ( dest_len, mask_len) ;
435435 assert_eq ! ( dest_len, yes_len) ;
@@ -448,9 +448,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
448448 // Variant of `select` that takes a bitmask rather than a "vector of bool".
449449 "select_bitmask" => {
450450 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) ?;
454454 let bitmask_len = dest_len. next_multiple_of ( 8 ) ;
455455 if bitmask_len > 64 {
456456 throw_unsup_format ! (
@@ -522,7 +522,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
522522 // Converts a "vector of bool" into a bitmask.
523523 "bitmask" => {
524524 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) ?;
526526 let bitmask_len = op_len. next_multiple_of ( 8 ) ;
527527 if bitmask_len > 64 {
528528 throw_unsup_format ! (
@@ -570,8 +570,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
570570 }
571571 "cast" | "as" | "cast_ptr" | "expose_provenance" | "with_exposed_provenance" => {
572572 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) ?;
575575
576576 assert_eq ! ( dest_len, op_len) ;
577577
@@ -627,9 +627,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
627627 }
628628 "shuffle_generic" => {
629629 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) ?;
633633
634634 let index = generic_args[ 2 ]
635635 . expect_const ( )
@@ -662,15 +662,15 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
662662 }
663663 "shuffle" => {
664664 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) ?;
668668
669669 // `index` is an array or a SIMD type
670670 let ( index, index_len) = match index. layout . ty . kind ( ) {
671671 // 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) ?,
674674 } ;
675675
676676 assert_eq ! ( left_len, right_len) ;
@@ -699,10 +699,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
699699 }
700700 "gather" => {
701701 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) ?;
706706
707707 assert_eq ! ( dest_len, passthru_len) ;
708708 assert_eq ! ( dest_len, ptrs_len) ;
@@ -725,9 +725,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
725725 }
726726 "scatter" => {
727727 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) ?;
731731
732732 assert_eq ! ( ptrs_len, value_len) ;
733733 assert_eq ! ( ptrs_len, mask_len) ;
@@ -745,10 +745,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
745745 }
746746 "masked_load" => {
747747 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) ?;
749749 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) ?;
752752
753753 assert_eq ! ( dest_len, mask_len) ;
754754 assert_eq ! ( dest_len, default_len) ;
@@ -772,9 +772,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
772772 }
773773 "masked_store" => {
774774 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) ?;
776776 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) ?;
778778
779779 assert_eq ! ( mask_len, vals_len) ;
780780
0 commit comments