@@ -426,24 +426,14 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
426
426
if ty. layout . size ( ) . bytes ( ) <= STACK_THRESHOLD {
427
427
return None ;
428
428
}
429
- let mut mplace = None ;
430
- let _alloc_id = self
431
- . ecx
432
- . intern_with_temp_alloc ( ty, |ecx, dest| {
433
- // FIXME: Can we speed it up by using `ecx.write_immediate(.ScalarPair(_), dest)`?
434
- for ( field_index, op) in fields. iter ( ) . copied ( ) . enumerate ( ) {
435
- let field_dest = ecx. project_field ( dest, field_index) ?;
436
- ecx. copy_op ( op, & field_dest) ?;
437
- }
438
-
439
- let dest =
440
- dest. assert_mem_place ( ) . map_provenance ( |prov| prov. as_immutable ( ) ) ;
441
- mplace. replace ( dest) ;
442
- Ok ( ( ) )
443
- } )
444
- . ok ( ) ?;
445
- let mplace = mplace. unwrap ( ) ;
446
- mplace. into ( )
429
+ let dest = self . ecx . allocate ( ty, MemoryKind :: Stack ) . ok ( ) ?;
430
+ // FIXME: Can we speed it up by using `ecx.write_immediate(.ScalarPair(_), dest)`?
431
+ for ( field_index, op) in fields. iter ( ) . copied ( ) . enumerate ( ) {
432
+ let field_dest = self . ecx . project_field ( & dest, field_index) . ok ( ) ?;
433
+ self . ecx . copy_op ( op, & field_dest) . ok ( ) ?;
434
+ }
435
+ let dest = dest. map_provenance ( |prov| prov. as_immutable ( ) ) ;
436
+ dest. into ( )
447
437
} else if matches ! ( ty. abi, Abi :: Scalar ( ..) | Abi :: ScalarPair ( ..) ) {
448
438
let dest = self . ecx . allocate ( ty, MemoryKind :: Stack ) . ok ( ) ?;
449
439
let variant_dest = if let Some ( variant) = variant {
0 commit comments