Skip to content

Add missing F32->I64 vec_signede, F32->I64 vec_signedo, F32->U64 vec_unsignede, and F32->U64 vec_unsignedo to altivec.h header #123605

Open
@johnplatts

Description

@johnplatts

GCC 15 has removed the __builtin_vsx_xvcvspsxds builtin and replaced the __builtin_vsx_xvcvspsxds builtin with F32->I64 vec_signede/vec_signedo intrinsics.

GCC 15 has also removed the __builtin_vsx_xvcvspuxds builtin and replaced the __builtin_vsx_xvcvspuxds builtin with F32->U64 vec_unsignede/vec_unsignedo intrinsics.

Clang already has the F64->I32 vec_signede/vec_signedo and F64->U32 vec_unsignede/vec_unsignedo intrinsics, but not the F32->I64 vec_signede/vec_signedo or the F32->U64 vec_unsignede/vec_unsignedo intrinsics.

The following functions need to be added to clang/lib/Headers/altivec.h:

  • vector signed long long vec_signede(vector float a): equivalent to __builtin_vsx_xvcvspsxds on big-endian VSX and equivalent to __builtin_vsx_xvcvspsxds(vec_sld(a, a, 4)) on little-endian VSX
  • vector signed long long vec_signedo(vector float a): equivalent to __builtin_vsx_xvcvspsxds on little-endian VSX and equivalent to __builtin_vsx_xvcvspsxds(vec_sld(a, a, 4)) on big-endian VSX
  • vector unsigned long long vec_unsignede(vector float a): equivalent to __builtin_vsx_xvcvspuxds on big-endian VSX and equivalent to __builtin_vsx_xvcvspuxds(vec_sld(a, a, 4)) on little-endian VSX
  • vector unsigned long long vec_unsignedo(vector float a): equivalent to __builtin_vsx_xvcvspuxds on little-endian VSX and equivalent to __builtin_vsx_xvcvspuxds(vec_sld(a, a, 4)) on big-endian VSX

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:headersHeaders provided by Clang, e.g. for intrinsics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions