Skip to content

Commit 4821471

Browse files
authored
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.
2 parents f4b4a9d + eb4c00e commit 4821471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: crates/hir-ty/src/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fn layout_of_simd_ty(
179179
.size
180180
.checked_mul(e_len, dl)
181181
.ok_or(LayoutError::BadCalc(LayoutCalculatorError::SizeOverflow))?;
182-
let align = dl.vector_align(size);
182+
let align = dl.llvmlike_vector_align(size);
183183
let size = size.align_to(align.abi);
184184

185185
// Compute the placement of the vector fields:

0 commit comments

Comments
 (0)