about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-23 00:16:19 +0100
committerGitHub <noreply@github.com>2025-02-23 00:16:19 +0100
commit86008eaeac3d6ac1403dccd17407a36b3aaec260 (patch)
treeb1f2c273389d963714db444cf66945cbe5a8140b /src
parent4115f51d15015c83c29d69e21156445e12324690 (diff)
parent46f7a7d378972b4034118f798657a6d35091a4ca (diff)
downloadrust-86008eaeac3d6ac1403dccd17407a36b3aaec260.tar.gz
rust-86008eaeac3d6ac1403dccd17407a36b3aaec260.zip
Rollup merge of #137256 - workingjubilee:untangle-vector-abi-assumptions, r=bjorn3,RalfJung
compiler: untangle SIMD alignment assumptions

There were a number of puzzling assumptions being made about SIMD types and their layout that I have corrected in this diff. These are mostly no-op edits in actual fact, but they do subtly alter a pair of checks in our invariant-checking and union layout computation that rested on those peculiar assumptions. Those unfortunately stand in the way of any further actual fixes. I submit this for review, even though it's not clearly motivated without its followups, because it should still be possible to independently conclude whether this is correct.
Diffstat (limited to 'src')
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs
index f5a7b658123..a72bcad50a0 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs
@@ -179,7 +179,7 @@ fn layout_of_simd_ty(
         .size
         .checked_mul(e_len, dl)
         .ok_or(LayoutError::BadCalc(LayoutCalculatorError::SizeOverflow))?;
-    let align = dl.vector_align(size);
+    let align = dl.llvmlike_vector_align(size);
     let size = size.align_to(align.abi);
 
     // Compute the placement of the vector fields: