Rollup merge of #145705 - folkertdev:prefetch-remove-as-cast, r=RalfJung

remove an `as` cast in prefetch codegen

r? `@RalfJung`
This commit is contained in:
Jacob Pratt
2025-08-21 17:57:58 -04:00
committed by GitHub

View File

@@ -330,7 +330,7 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
_ => bug!(),
};
let ptr = args[0].immediate();
let locality = fn_args.const_at(1).to_value().valtree.unwrap_leaf().to_u32() as i32;
let locality = fn_args.const_at(1).to_value().valtree.unwrap_leaf().to_i32();
self.call_intrinsic(
"llvm.prefetch",
&[self.val_ty(ptr)],