Skip to content

Implement context-aware validation for SIMD MIR projections (MCP#838)#153703

Open
Delta17920 wants to merge 1 commit intorust-lang:mainfrom
Delta17920:simd-fix-final
Open

Implement context-aware validation for SIMD MIR projections (MCP#838)#153703
Delta17920 wants to merge 1 commit intorust-lang:mainfrom
Delta17920:simd-fix-final

Conversation

@Delta17920
Copy link
Contributor

@Delta17920 Delta17920 commented Mar 11, 2026

Allow expressions like self.0[2] on simd types by permitting field 0 as an intermediate projection step when followed by an index projection. standalone field access like a.0 remains banned.

changes:

  • as_place.rs: allow field 0 through for simd, block all other fields
  • statement.rs: teach projection_ty_core the element type of simd index
  • place.rs: peel simd struct wrapper before computing codegen offsets
  • validate.rs: ban field projections on simd unless followed by an index

Fixes #153636

@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, mir, mir-opt
  • compiler, mir, mir-opt expanded to 69 candidates
  • Random selection from 16 candidates

@jieyouxu
Copy link
Member

@rustbot reroll

@rustbot rustbot assigned nnethercote and unassigned jieyouxu Mar 11, 2026
@nnethercote
Copy link
Contributor

I think

r? @scottmcm

mMight be a more appropriate reviewer? I don't know this stuff at all.

@rustbot rustbot assigned scottmcm and unassigned nnethercote Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: broken MIR in Item at bb1[0]

5 participants