when doing a memcpy, don't take alignment into account

This commit is contained in:
Folkert 2022-03-30 17:33:43 +02:00
parent e94bdb0ed8
commit 786246f427
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -2567,9 +2567,10 @@ pub fn build_exp_stmt<'a, 'ctx, 'env>(
if value_ptr.get_first_use().is_some() {
value_ptr.replace_all_uses_with(destination);
} else {
let size = env
.ptr_int()
.const_int(layout.stack_size(env.target_info) as u64, false);
let size = env.ptr_int().const_int(
layout.stack_size_without_alignment(env.target_info) as u64,
false,
);
env.builder
.build_memcpy(