1
Fork 0

Evaluate constants in SIMD vec lengths before rejecting them

This commit is contained in:
Oli Scherer 2024-12-09 10:06:51 +00:00
parent c04b52ae9e
commit 6d3d61f1b0
3 changed files with 2 additions and 11 deletions

View file

@ -83,6 +83,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
let (size, ty) = match elem_ty.kind() {
ty::Array(ty, len) => {
let len = self.tcx.normalize_erasing_regions(self.typing_env, *len);
if let Some(len) = len.try_to_target_usize(self.tcx) {
(len, *ty)
} else {