Skip to content

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

Description

@vinoth-vinjey

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
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions