Use value_lane instead of value_field in simd/llvm.rs

This commit is contained in:
bjorn3 2022-09-05 15:31:14 +00:00
parent c4c393c78e
commit 0bb9bdf8e3

View file

@ -29,8 +29,7 @@ pub(crate) fn codegen_llvm_intrinsic_call<'tcx>(
let mut res = fx.bcx.ins().iconst(types::I32, 0);
for lane in (0..lane_count).rev() {
let a_lane =
a.value_field(fx, mir::Field::new(lane.try_into().unwrap())).load_scalar(fx);
let a_lane = a.value_lane(fx, lane).load_scalar(fx);
// cast float to int
let a_lane = match lane_ty {