[BUG] Reinterpret cast (vreinterpret*) table has 10 missing rows and 2 incorrect rows for AArch32

Open Beginner friendly
#442 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c
Domain
documentation

Research direction

Start with the documentation page containing the AArch32 vreinterpret* table and compare its entries against the attached testing.c reproduction. Add the 10 missing rows and mark the 2 unsupported rows as A64-only; the table should then match the stated GCC behavior and architecture availability.

Written by the indexing model from the issue text.

Description

bug

Summary

Cross-checking the documented reinterpret-cast (vreinterpret*) entries for AArch32 (tagged
v7/A32/A64 or A32/A64) against actual compiler behavior on GCC turned up two distinct
issues: 10 functions that compile correctly but are absent from the documentation, and 2
documented functions that cannot exist because their underlying data types are not available
in AArch32 ISA.

Issue 1: 10 undocumented but implemented reinterpret casts

The supported AArch32 (v7/A32) data types are:

  • Signed integer: s8, s16, s32, s64
  • Unsigned integer: u8, u16, u32, u64
  • Floating point: bf16, f16, f32
  • Polynomial: p8, p16, p64, p128

A full cross-reinterpret matrix over these types is documented for nearly every pair, at
both 64-bit and 128-bit widths — except for the following 10, which are missing from the
page entirely:

vreinterpret_bf16_f16
vreinterpret_f16_bf16
vreinterpret_f32_p64
vreinterpret_p64_s64
vreinterpretq_bf16_f16
vreinterpretq_f16_bf16
vreinterpretq_f32_p128
vreinterpretq_f32_p64
vreinterpretq_p128_p64
vreinterpretq_p64_p128

Notably, for 8 of these 10, the reverse direction is already correctly documented (e.g.
vreinterpret_p64_f32 is present; vreinterpret_f32_p64 is not). This asymmetry strongly
suggests an omission rather than an intentional exclusion - there's no principled reason a
reinterpret would be valid in one direction but not the other.

We confirmed all 10 functions compile correctly and are available unconditionally (not
gated to AArch64) on GCC.

Reproduction: attached testing.c compiles cleanly with
arm-none-linux-gnueabihf-gcc -march=armv8.2-a+simd+fp16+crypto+bf16 -mfpu=crypto-neon-fp-armv8.

Issue 2: 2 documented reinterpret casts whose data types don't exist on AArch32

The page lists:

vreinterpret_mf8_p64      (tagged A32/A64)
vreinterpretq_f64_u64     (tagged v7/A32/A64)

However, mfloat8x8_t/mfloat8x16_t and float64x2_t are not implemented available in
AArch32 ISA and GCC compiler

Suggested fix

  • Add the 10 missing rows in Issue 1 to the reinterpret-cast table.
  • Update the 2 rows in Issue 2, as A64 only.

testing.c

Our commitment

We will work to solve the bug report in time for the upcoming
release. However, we would like to encourage you to submit the fix
yourself, if possible. If you intend to do so and this is your first
contribution, we recommend reading our contribution
guidelines
.

Dominant language
Python
Stars
129
Forks
76
Avg merge
6d 16h
Merged PRs (30d)
6

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.

More from ARM-software/acle

All issues in ARM-software/acle

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.