[all-commits] [llvm/llvm-project] 2a0162: [AArch64][SVE] Change the immediate argument in sv...

SpencerAbson via All-commits all-commits at lists.llvm.org
Tue Nov 26 08:51:13 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a0162c0193a73ef16aee67dbe66abb9d2e4717c
      https://github.com/llvm/llvm-project/commit/2a0162c0193a73ef16aee67dbe66abb9d2e4717c
  Author: SpencerAbson <Spencer.Abson at arm.com>
  Date:   2024-11-26 (Tue, 26 Nov 2024)

  Changed paths:
    M clang/include/clang/Basic/arm_sve.td
    M clang/test/CodeGen/AArch64/sve2p1-intrinsics/acle_sve2p1_extq.c
    M clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sve2p1_imm.cpp
    M llvm/lib/Target/AArch64/AArch64InstrFormats.td
    M llvm/lib/Target/AArch64/SVEInstrFormats.td
    M llvm/test/CodeGen/AArch64/sve2p1-intrinsics-extq.ll

  Log Message:
  -----------
  [AArch64][SVE] Change the immediate argument in svextq (#115340)

In order to align with `svext` and NEON `vext`/`vextq`, this patch
changes immediate argument in `svextq` such that it refers to elements
of the size of those of the source vector, rather than bytes. The [spec
for this
intrinsic](https://github.com/ARM-software/acle/blob/main/main/acle.md#extq)
is ambiguous about the meaning of this argument, this issue was raised
after there was a differing interpretation for it from the implementers
of the ACLE in GCC.

For example (with our current implementation):

`svextq_f64(zn_f64, zm_f64, 1)` would, for each 128-bit segment of
`zn_f64,` concatenate the highest 15 bytes of this segment with the
first byte of the corresponding segment of `zm_f64`.

After this patch, the behavior of `svextq_f64(zn_f64, zm_f64, 1)` would
be, for each 128-bit vector segment of `zn_f64`, to concatenate the
higher doubleword of this segment with the lower doubleword of the
corresponding segment of `zm_f64`.

The range of the immediate argument in `svextq` would be modified such
that it is:
- [0,15] for `svextq_{s8,u8}`
- [0,7] for `svextq_{s16,u16,f16,bf16}`
- [0,3] for `svextq_{s32,u32,f32}`
- [0,1] for `svextq_{s64,u64,f64}`



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list