Skip to content

Commit 6704450

Browse files
committed
trans: Reuse immediate value in call to call_memset()
1 parent c3603f3 commit 6704450

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_trans/mir/rvalue.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
122122
if common::val_ty(v) == Type::i8(bcx.ccx) {
123123
let align = align.unwrap_or_else(|| bcx.ccx.align_of(tr_elem.ty));
124124
let align = C_i32(bcx.ccx, align as i32);
125-
let fill = tr_elem.immediate();
126-
base::call_memset(&bcx, base, fill, size, align, false);
125+
base::call_memset(&bcx, base, v, size, align, false);
127126
return bcx;
128127
}
129128
}

0 commit comments

Comments
 (0)