@@ -564,27 +564,7 @@ impl<'tcx> CPlace<'tcx> {
564
564
src_ty,
565
565
dst_ty,
566
566
) ;
567
- let data = match ( src_ty, dst_ty) {
568
- ( _, _) if src_ty == dst_ty => data,
569
-
570
- // This is a `write_cvalue_transmute`.
571
- ( types:: I32 , types:: F32 )
572
- | ( types:: F32 , types:: I32 )
573
- | ( types:: I64 , types:: F64 )
574
- | ( types:: F64 , types:: I64 ) => codegen_bitcast ( fx, dst_ty, data) ,
575
- _ if src_ty. is_vector ( ) && dst_ty. is_vector ( ) => codegen_bitcast ( fx, dst_ty, data) ,
576
- _ if src_ty. is_vector ( ) || dst_ty. is_vector ( ) => {
577
- // FIXME(bytecodealliance/wasmtime#6104) do something more efficient for transmutes between vectors and integers.
578
- let ptr = fx. create_stack_slot ( src_ty. bytes ( ) , src_ty. bytes ( ) ) ;
579
- ptr. store ( fx, data, MemFlags :: trusted ( ) ) ;
580
- ptr. load ( fx, dst_ty, MemFlags :: trusted ( ) )
581
- }
582
-
583
- // `CValue`s should never contain SSA-only types, so if you ended
584
- // up here having seen an error like `B1 -> I8`, then before
585
- // calling `write_cvalue` you need to add a `bint` instruction.
586
- _ => unreachable ! ( "write_cvalue_transmute: {:?} -> {:?}" , src_ty, dst_ty) ,
587
- } ;
567
+ let data = if src_ty == dst_ty { data } else { codegen_bitcast ( fx, dst_ty, data) } ;
588
568
//fx.bcx.set_val_label(data, cranelift_codegen::ir::ValueLabel::new(var.index()));
589
569
fx. bcx . def_var ( var, data) ;
590
570
}
0 commit comments