Unnamed repository; edit this file 'description' to name the repository.
Rollup merge of #151628 - enthropy7:fix-simd-const-eval-ice, r=RalfJung
Fix ICE in const eval of packed SIMD types with non-power-of-two element counts fixes rust-lang/rust#151537 const evaluation of packed SIMD types with non-power-of-two element counts (like `Simd<_, 3>`) was hitting an ICE. the issue was in `check_simd_ptr_alignment` - it asserted that `backend_repr` must be `BackendRepr::SimdVector`, but for packed SIMD types with non-power-of-two counts the compiler uses `BackendRepr::Memory` instead (as mentioned in `rustc_abi/src/layout.rs:1511`). was fixed by making `check_simd_ptr_alignment` accept both `BackendRepr::SimdVector` and `BackendRepr::Memory` for SIMD types. added a check to ensure we're dealing with a SIMD type, and the alignment logic works the same for both representations. also i added a test that reproduces the original ICE.
Jonathan Brouwer 9 weeks ago
parent ba9946d · parent 33411cf · commit 55db795
0 files changed, 0 insertions, 0 deletions