@@ -293,16 +293,17 @@ pub trait BuilderMethods<'a, 'tcx>:
293293 debug_assert ! ( src. llextra. is_none( ) , "cannot directly copy from unsized values" ) ;
294294 debug_assert ! ( dst. llextra. is_none( ) , "cannot directly copy into unsized values" ) ;
295295 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 ) {
302297 // HACK(nox): This is inefficient but there is no nontemporal memcpy.
303298 let ty = self . backend_type ( dst. layout ) ;
304299 let val = self . load ( ty, src. llval , src. align ) ;
305300 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) ;
306307 } else if !dst. layout . is_zst ( ) {
307308 let bytes = self . const_usize ( dst. layout . size . bytes ( ) ) ;
308309 self . memcpy ( dst. llval , dst. align , src. llval , src. align , bytes, flags) ;
0 commit comments