Auto merge of #137608 - fmease:rollup-h4siso6, r=fmease
Rollup of 8 pull requests Successful merges: - #137370 (adjust_abi: make fallback logic for ABIs a bit easier to read) - #137444 (Improve behavior of `IF_LET_RESCOPE` around temporaries and place expressions) - #137464 (Fix invalid suggestion from type error for derive macro) - #137539 ( Add rustdoc-gui regression test for #137082 ) - #137576 (Don't doc-comment BTreeMap<K, SetValZST, A>) - #137595 (remove `simd_fpow` and `simd_fpowi`) - #137600 (type_ir: remove redundant part of comment) - #137602 (feature: fix typo in attribute description) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
85abb27636
26 changed files with 251 additions and 391 deletions
|
@ -460,64 +460,6 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
|
|||
});
|
||||
}
|
||||
|
||||
sym::simd_fpow => {
|
||||
intrinsic_args!(fx, args => (a, b); intrinsic);
|
||||
|
||||
if !a.layout().ty.is_simd() {
|
||||
report_simd_type_validation_error(fx, intrinsic, span, a.layout().ty);
|
||||
return;
|
||||
}
|
||||
|
||||
simd_pair_for_each_lane(fx, a, b, ret, &|fx, lane_ty, _ret_lane_ty, a_lane, b_lane| {
|
||||
match lane_ty.kind() {
|
||||
ty::Float(FloatTy::F32) => fx.lib_call(
|
||||
"powf",
|
||||
vec![AbiParam::new(types::F32), AbiParam::new(types::F32)],
|
||||
vec![AbiParam::new(types::F32)],
|
||||
&[a_lane, b_lane],
|
||||
)[0],
|
||||
ty::Float(FloatTy::F64) => fx.lib_call(
|
||||
"pow",
|
||||
vec![AbiParam::new(types::F64), AbiParam::new(types::F64)],
|
||||
vec![AbiParam::new(types::F64)],
|
||||
&[a_lane, b_lane],
|
||||
)[0],
|
||||
_ => unreachable!("{:?}", lane_ty),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sym::simd_fpowi => {
|
||||
intrinsic_args!(fx, args => (a, exp); intrinsic);
|
||||
let exp = exp.load_scalar(fx);
|
||||
|
||||
if !a.layout().ty.is_simd() {
|
||||
report_simd_type_validation_error(fx, intrinsic, span, a.layout().ty);
|
||||
return;
|
||||
}
|
||||
|
||||
simd_for_each_lane(
|
||||
fx,
|
||||
a,
|
||||
ret,
|
||||
&|fx, lane_ty, _ret_lane_ty, lane| match lane_ty.kind() {
|
||||
ty::Float(FloatTy::F32) => fx.lib_call(
|
||||
"__powisf2", // compiler-builtins
|
||||
vec![AbiParam::new(types::F32), AbiParam::new(types::I32)],
|
||||
vec![AbiParam::new(types::F32)],
|
||||
&[lane, exp],
|
||||
)[0],
|
||||
ty::Float(FloatTy::F64) => fx.lib_call(
|
||||
"__powidf2", // compiler-builtins
|
||||
vec![AbiParam::new(types::F64), AbiParam::new(types::I32)],
|
||||
vec![AbiParam::new(types::F64)],
|
||||
&[lane, exp],
|
||||
)[0],
|
||||
_ => unreachable!("{:?}", lane_ty),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
sym::simd_fsin
|
||||
| sym::simd_fcos
|
||||
| sym::simd_fexp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue