cranelift: don't emit FEAT_FP16 instructions without the feature, and support f16 in the interpreter - #14436
Open
dsecurity49 wants to merge 2 commits into
Open
cranelift: don't emit FEAT_FP16 instructions without the feature, and support f16 in the interpreter#14436dsecurity49 wants to merge 2 commits into
dsecurity49 wants to merge 2 commits into
Conversation
dsecurity49
force-pushed
the
f16-aarch64-and-interpreter
branch
from
September 28, 2026 14:27
aeaecea to
81a4ea3
Compare
Subscribe to Label Actioncc @avanhatt, @cfallin, @fitzgen, @mmcloughlin DetailsThis issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "isle"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
This branch has not been deployed
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.
Two f16 fixes for AArch64, plus interpreter support so f16 can be tested.
f16 arithmetic on AArch64 was emitting half-precision instructions without FEAT_FP16, which are UNDEFINED (Arm ARM, C7.2.73 FCVT).
fadd.f16on plaintarget aarch64compiled tofadd h0, h0, h1and trapped at run time. Adds aty_scalar_float_with_fp16extractor mirroring the RISC-V Zfh gate, makes the four fma constructorspartialso the negated forms report instead of panicking, and lowersfcopysign.f16in integer registers, which previously panicked.The interpreter only handled F32/F64, so
test interpretfailed on f16 and fuzzgen had no oracle for it. AddsIeee16::to_f32andfrom_f32_rne/from_f64_rne, withfmawidening to f64 so the exact product and sum survives.Includes precise-output filetests for the new lowerings, and
test interpreton the f16 runtests.