Repository navigation
perf(backend): lower scalar floating-point operations to native instructions - #1704
Merged
Conversation
…uctions Basic scalar floating-point operations previously became native helper calls. Preserve the existing precision-aware SIR operations in dedicated FloatBinary/FloatUnary MIR instructions and emit SSE2 on x86-64 and floating-point instructions on AArch64. Cranelift now also lowers typed FP operations directly; Wasm already did. Cover f32/f64 arithmetic, comparisons, negation, truth conversion, and precision conversion. Track MIR operands, scheduling, memory effects, and x86 scratch-register clobbers so live scalar and SIMD values remain intact. Keep helpers for remainder, power, and integer conversions requiring existing rounding/modulo behavior. The native image ABI is unchanged. Validation: - 614 x86 backend tests, 49 AArch64 backend tests, and 34 Cranelift/Wasm tests passed. - 177 focused integration tests passed across FP execution/display, SystemVerilog FP, native MIR, fresh-process native images, and shared JIT caches; existing Veryl exclusions retained. - Regression tests verify helper-free basic FP lowering, NaNs, signed zero, infinities, subnormals, register pressure, and SIMD scratch clobbers. - Affected crates pass clippy; formatting and diff checks pass. - AArch64 instruction selection and exact emitted encodings were tested locally; AArch64 execution was unavailable on this x86 host. Refs #1654 Change-Id: I2c4c14a1a72869a91174315d6b08aa90576f05f7
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Merge Queue Status
This pull request spent 1 hour 29 minutes 42 seconds in the queue, including 1 hour 27 minutes 8 seconds running CI. Required conditions to merge
|
40 of 71 tasks
mergify
Bot
deleted the
stack/tignear/feat/native-floating-point/lower-scalar-floating-point-operations-native--2c4c14a1
branch
October 22, 2026 03:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic scalar floating-point operations previously became native helper calls. Preserve the existing precision-aware SIR operations in dedicated FloatBinary/FloatUnary MIR instructions and emit SSE2 on x86-64 and floating-point instructions on AArch64. Cranelift now also lowers typed FP operations directly; Wasm already did.
Cover f32/f64 arithmetic, comparisons, negation, truth conversion, and precision conversion. Track MIR operands, scheduling, memory effects, and x86 scratch-register clobbers so live scalar and SIMD values remain intact. Keep helpers for remainder, power, and integer conversions requiring existing rounding/modulo behavior. The native image ABI is unchanged.
Validation:
Refs #1654