Skip to content

Commit 1e2722d

Browse files
committed
Add f16 and f128 as simd types in GCC
1 parent 4941e13 commit 1e2722d

File tree

1 file changed

+5
-1
lines changed
  • compiler/rustc_codegen_gcc/src/intrinsic

1 file changed

+5
-1
lines changed

compiler/rustc_codegen_gcc/src/intrinsic/simd.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,10 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
593593
let (elem_ty_str, elem_ty) = if let ty::Float(f) = in_elem.kind() {
594594
let elem_ty = bx.cx.type_float_from_ty(*f);
595595
match f.bit_width() {
596+
16 => ("h", elem_ty),
596597
32 => ("f", elem_ty),
597598
64 => ("", elem_ty),
599+
128 => ("q", elem_ty),
598600
_ => {
599601
return_error!(InvalidMonomorphization::FloatingPointVector {
600602
span,
@@ -816,7 +818,9 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
816818
let (_, element_ty0) = arg_tys[0].simd_size_and_type(bx.tcx());
817819
let (_, element_ty1) = arg_tys[1].simd_size_and_type(bx.tcx());
818820
let (pointer_count, underlying_ty) = match *element_ty1.kind() {
819-
ty::RawPtr(p_ty, _) if p_ty == in_elem => (ptr_count(element_ty1), non_ptr(element_ty1)),
821+
ty::RawPtr(p_ty, _) if p_ty == in_elem => {
822+
(ptr_count(element_ty1), non_ptr(element_ty1))
823+
}
820824
_ => {
821825
require!(
822826
false,

0 commit comments

Comments
 (0)