diff options
| author | bors <bors@rust-lang.org> | 2025-04-20 22:41:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-20 22:41:28 +0000 |
| commit | b8005bff3248cfc6e327faf4fa631ac49bb49ba9 (patch) | |
| tree | 3679d86cf63d47fc6e5aaa8a936e8c377519fd06 /compiler/rustc_codegen_gcc | |
| parent | b8c54d6358926028ac2fab1ec2b8665c70edb1c0 (diff) | |
| parent | d3fab38b0ae3b868057739daeb6cc30c55d76472 (diff) | |
| download | rust-b8005bff3248cfc6e327faf4fa631ac49bb49ba9.tar.gz rust-b8005bff3248cfc6e327faf4fa631ac49bb49ba9.zip | |
Auto merge of #140079 - ChrisDenton:rollup-2h5cg94, r=ChrisDenton
Rollup of 5 pull requests Successful merges: - #137953 (simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors) - #139990 (transmutability: remove NFA intermediate representation) - #140044 (rustc-dev-guide subtree update) - #140051 (Switch exploit mitigations to mdbook footnotes) - #140054 (docs: fix typo change from inconstants to invariants) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/intrinsic/simd.rs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs b/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs index 6d40d5297f1..b897d079249 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs @@ -447,9 +447,14 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( m_len == v_len, InvalidMonomorphization::MismatchedLengths { span, name, m_len, v_len } ); + // TODO: also support unsigned integers. match *m_elem_ty.kind() { ty::Int(_) => {} - _ => return_error!(InvalidMonomorphization::MaskType { span, name, ty: m_elem_ty }), + _ => return_error!(InvalidMonomorphization::MaskWrongElementType { + span, + name, + ty: m_elem_ty + }), } return Ok(bx.vector_select(args[0].immediate(), args[1].immediate(), args[2].immediate())); } @@ -991,19 +996,15 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( assert_eq!(pointer_count - 1, ptr_count(element_ty0)); assert_eq!(underlying_ty, non_ptr(element_ty0)); - // The element type of the third argument must be a signed integer type of any width: + // The element type of the third argument must be an integer type of any width: + // TODO: also support unsigned integers. let (_, element_ty2) = arg_tys[2].simd_size_and_type(bx.tcx()); match *element_ty2.kind() { ty::Int(_) => (), _ => { require!( false, - InvalidMonomorphization::ThirdArgElementType { - span, - name, - expected_element: element_ty2, - third_arg: arg_tys[2] - } + InvalidMonomorphization::MaskWrongElementType { span, name, ty: element_ty2 } ); } } @@ -1109,17 +1110,13 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( assert_eq!(underlying_ty, non_ptr(element_ty0)); // The element type of the third argument must be a signed integer type of any width: + // TODO: also support unsigned integers. match *element_ty2.kind() { ty::Int(_) => (), _ => { require!( false, - InvalidMonomorphization::ThirdArgElementType { - span, - name, - expected_element: element_ty2, - third_arg: arg_tys[2] - } + InvalidMonomorphization::MaskWrongElementType { span, name, ty: element_ty2 } ); } } |
