1
Fork 0

ScalarInt: size mismatches are a bug, do not delay the panic

This commit is contained in:
Ralf Jung 2024-06-08 16:13:45 +02:00
parent 13423befc4
commit 3c57ea0df7
45 changed files with 247 additions and 313 deletions

View file

@ -1221,7 +1221,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
.iter()
.enumerate()
.map(|(arg_idx, val)| {
let idx = val.unwrap_leaf().try_to_i32().unwrap();
let idx = val.unwrap_leaf().to_i32();
if idx >= i32::try_from(total_len).unwrap() {
bx.sess().dcx().emit_err(InvalidMonomorphization::SimdIndexOutOfBounds {
span,