auto merge of #6794 : thestinger/rust/align_zero, r=pcwalton
This is unlikely to alter optimized codegen much but there's no point in downgrading the known alignment to 1.
This commit is contained in:
@@ -1506,7 +1506,7 @@ pub fn memzero(cx: block, llptr: ValueRef, llty: TypeRef) {
|
||||
let llptr = PointerCast(cx, llptr, T_ptr(T_i8()));
|
||||
let llzeroval = C_u8(0);
|
||||
let size = IntCast(cx, machine::llsize_of(ccx, llty), ccx.int_type);
|
||||
let align = C_i32(1i32);
|
||||
let align = C_i32(llalign_of_min(ccx, llty) as i32);
|
||||
let volatile = C_i1(false);
|
||||
Call(cx, llintrinsicfn, [llptr, llzeroval, size, align, volatile]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user