rust-lang / rust-lang/portable-simd

Ensure `load`s of vector types have `!noundef`

Open
#372 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.1k
Forks
108
Avg merge
22h 53m
Merged PRs (30d)
3

Description

Assuming that -- like __m128 -- a u32x4 isn't actually allowed to be undef, we should ensure that we have !noundef metadata on the corresponding loads. (This assumes Simd<MaybeUninit<u32>, 4> would be needed for real uninit.)

It looks like today https://rust.godbolt.org/z/hs1MKh15x we don't:

  %_8 = load <2 x i32>, ptr %self, align 8
  %_9 = load <2 x i32>, ptr %other, align 8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the linked Rust Compiler Explorer example and inspecting its LLVM output, especially the vector loads shown in the issue. Trace how these loads are generated and verify that the corresponding loads carry !noundef metadata when the change is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.