rust-lang / rust-lang/rust

Scalar vector operations can use NEON instructions, which have incorrect subnormal behavior

Open
#129,853 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-floating-point A-LLVM C-bug T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

This is the Rust version of https://github.com/llvm/llvm-project/issues/106909: scalar f32/f64 operations can produce the wrong result for subnormals on ARM if NEON instructions are used.

This just got fixed in upstream LLVM, but we should also have a test covering this.

Cc @nikic

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 reading the linked upstream LLVM issue and locating Rust's compiler test entry point for ARM NEON scalar f32/f64 operations. Add coverage for the incorrect subnormal result, with the test passing once the relevant behavior is verified against the upstream fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.