@@ -293,16 +293,17 @@ pub trait BuilderMethods<'a, 'tcx>:
293
293
debug_assert ! ( src. llextra. is_none( ) , "cannot directly copy from unsized values" ) ;
294
294
debug_assert ! ( dst. llextra. is_none( ) , "cannot directly copy into unsized values" ) ;
295
295
debug_assert_eq ! ( dst. layout. size, src. layout. size) ;
296
- if self . sess ( ) . opts . optimize == OptLevel :: No && self . is_backend_immediate ( dst. layout ) {
297
- // If we're not optimizing, the aliasing information from `memcpy`
298
- // isn't useful, so just load-store the value for smaller code.
299
- let temp = self . load_operand ( src) ;
300
- temp. val . store_with_flags ( self , dst, flags) ;
301
- } else if flags. contains ( MemFlags :: NONTEMPORAL ) {
296
+ if flags. contains ( MemFlags :: NONTEMPORAL ) {
302
297
// HACK(nox): This is inefficient but there is no nontemporal memcpy.
303
298
let ty = self . backend_type ( dst. layout ) ;
304
299
let val = self . load ( ty, src. llval , src. align ) ;
305
300
self . store_with_flags ( val, dst. llval , dst. align , flags) ;
301
+ } else if self . sess ( ) . opts . optimize == OptLevel :: No && self . is_backend_immediate ( dst. layout )
302
+ {
303
+ // If we're not optimizing, the aliasing information from `memcpy`
304
+ // isn't useful, so just load-store the value for smaller code.
305
+ let temp = self . load_operand ( src) ;
306
+ temp. val . store_with_flags ( self , dst, flags) ;
306
307
} else if !dst. layout . is_zst ( ) {
307
308
let bytes = self . const_usize ( dst. layout . size . bytes ( ) ) ;
308
309
self . memcpy ( dst. llval , dst. align , src. llval , src. align , bytes, flags) ;
0 commit comments