Files
rust/tests/ui/consts/const-eval
Jonathan Brouwer 8a3d112fad 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.
2026-02-22 11:31:11 +01:00
..
2026-01-01 19:17:11 -05:00
2025-11-27 14:13:58 -05:00
2024-09-15 09:51:32 +02:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2024-09-15 09:51:32 +02:00
2025-07-18 07:47:08 +00:00
2025-09-03 15:24:49 +02:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2025-07-18 07:47:08 +00:00
2024-04-22 18:48:47 +02:00