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:
bors 2013-05-29 07:32:06 -07:00
commit 844b5cff36

View file

@ -1506,7 +1506,7 @@ pub fn memzero(cx: block, llptr: ValueRef, llty: TypeRef) {
let llptr = PointerCast(cx, llptr, T_ptr(T_i8())); let llptr = PointerCast(cx, llptr, T_ptr(T_i8()));
let llzeroval = C_u8(0); let llzeroval = C_u8(0);
let size = IntCast(cx, machine::llsize_of(ccx, llty), ccx.int_type); 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); let volatile = C_i1(false);
Call(cx, llintrinsicfn, [llptr, llzeroval, size, align, volatile]); Call(cx, llintrinsicfn, [llptr, llzeroval, size, align, volatile]);
} }