Skip to content

Commit

Permalink
Auto merge of #127487 - tgross35:f16-f128-simd, r=Amanieu
Browse files Browse the repository at this point in the history
Add `f16` and `f128` as simd types in LLVM

`@sayantn` is working on adding SIMD for `f16` and hitting the `FloatingPointVector` error. This should fix it and unblock adding support for `simd_fma` and `simd_fabs` in stdarch.
  • Loading branch information
bors committed Jul 11, 2024
2 parents c92a8e4 + 04caa55 commit bcf1f6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,10 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
let (elem_ty_str, elem_ty) = if let ty::Float(f) = in_elem.kind() {
let elem_ty = bx.cx.type_float_from_ty(*f);
match f.bit_width() {
16 => ("f16", elem_ty),
32 => ("f32", elem_ty),
64 => ("f64", elem_ty),
128 => ("f128", elem_ty),
_ => return_error!(InvalidMonomorphization::FloatingPointVector {
span,
name,
Expand Down

0 comments on commit bcf1f6d

Please sign in to comment.