Fix portable-simd tests
This commit is contained in:
parent
60ef392a2a
commit
24361a1b99
@ -243,6 +243,20 @@ pub(crate) fn codegen_aarch64_llvm_intrinsic_call<'tcx>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FIXME generalize vector types
|
// FIXME generalize vector types
|
||||||
|
"llvm.aarch64.neon.tbl1.v8i8" => {
|
||||||
|
intrinsic_args!(fx, args => (t, idx); intrinsic);
|
||||||
|
|
||||||
|
let zero = fx.bcx.ins().iconst(types::I8, 0);
|
||||||
|
for i in 0..8 {
|
||||||
|
let idx_lane = idx.value_lane(fx, i).load_scalar(fx);
|
||||||
|
let is_zero =
|
||||||
|
fx.bcx.ins().icmp_imm(IntCC::UnsignedGreaterThanOrEqual, idx_lane, 16);
|
||||||
|
let t_idx = fx.bcx.ins().uextend(fx.pointer_type, idx_lane);
|
||||||
|
let t_lane = t.value_lane_dyn(fx, t_idx).load_scalar(fx);
|
||||||
|
let res = fx.bcx.ins().select(is_zero, zero, t_lane);
|
||||||
|
ret.place_lane(fx, i).to_ptr().store(fx, res, MemFlags::trusted());
|
||||||
|
}
|
||||||
|
}
|
||||||
"llvm.aarch64.neon.tbl1.v16i8" => {
|
"llvm.aarch64.neon.tbl1.v16i8" => {
|
||||||
intrinsic_args!(fx, args => (t, idx); intrinsic);
|
intrinsic_args!(fx, args => (t, idx); intrinsic);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user