Skip to content

Commit b32f4d5

Browse files
committed
remove an as cast in prefetch codegen
1 parent 922958c commit b32f4d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
330330
_ => bug!(),
331331
};
332332
let ptr = args[0].immediate();
333-
let locality = fn_args.const_at(1).to_value().valtree.unwrap_leaf().to_u32() as i32;
333+
let locality = fn_args.const_at(1).to_value().valtree.unwrap_leaf().to_i32();
334334
self.call_intrinsic(
335335
"llvm.prefetch",
336336
&[self.val_ty(ptr)],

0 commit comments

Comments
 (0)