[all-commits] [llvm/llvm-project] 76ca2e: [LoongArch][Clang] Add tests for #110834 (#114509)

Xi Ruoyao via All-commits all-commits at lists.llvm.org
Fri Nov 15 00:21:27 PST 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 76ca2e0566c8589c0b4f91faea5ce6ed3536a384
      https://github.com/llvm/llvm-project/commit/76ca2e0566c8589c0b4f91faea5ce6ed3536a384
  Author: Xi Ruoyao <xry111 at xry111.site>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    A clang/test/Headers/lasxintrin.c
    A clang/test/Headers/lsxintrin.c

  Log Message:
  -----------
  [LoongArch][Clang] Add tests for #110834 (#114509)

(cherry picked from commit 96d2196f6f73e5712f1df8cd26de8a12c7f24de4)


  Commit: 6a668bce7b50807e861d4769ad1a253a0579d4ad
      https://github.com/llvm/llvm-project/commit/6a668bce7b50807e861d4769ad1a253a0579d4ad
  Author: Xi Ruoyao <xry111 at xry111.site>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsLoongArchLASX.def
    M clang/include/clang/Basic/BuiltinsLoongArchLSX.def

  Log Message:
  -----------
  [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for LSX and LASX builtins (#114510)

`-flax-vector-conversions=none` does not allow an implicit conversion
from `signed char` vector to `char` vector, and we cannot remove
`signed`
from `v16i8` or `v32i8` because doing so will break our expectation with
`-fno-signed-char`.  So to make lsxintrin.h and lasxintrin.h work fine
with `-flax-vector-conversions=none`, we must use `signed char` instead
of `char`.

The change is just done via

    sed 's/V16c/V16Sc/g' -i BuiltinsLoongArchLSX.def
    sed 's/V32c/V32Sc/g' -i BuiltinsLoongArchLASX.def

Depends on #114509.  Part of #110834 fix.

(cherry picked from commit b88505414d47ca267f4df8823309264f78935686)


  Commit: 3f9b36d195927e7aa0c133cd2d1efcc489b5fb7c
      https://github.com/llvm/llvm-project/commit/3f9b36d195927e7aa0c133cd2d1efcc489b5fb7c
  Author: Xi Ruoyao <xry111 at xry111.site>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsLoongArchLASX.def
    M clang/include/clang/Basic/BuiltinsLoongArchLSX.def

  Log Message:
  -----------
  [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (#114511)

These builtins operate on int8 vectors, not int16 vectors.  So the old
definition does not make any sense.

Depends on #114510.  Part of #110834 fix.

(cherry picked from commit 92daad2eac587cb0592de019cd5f6cbb7c42bb78)


  Commit: 0c5f639d8e61957b5ea31af8a3ecf588ce9864af
      https://github.com/llvm/llvm-project/commit/0c5f639d8e61957b5ea31af8a3ecf588ce9864af
  Author: Xi Ruoyao <xry111 at xry111.site>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsLoongArchLASX.def
    M clang/include/clang/Basic/BuiltinsLoongArchLSX.def

  Log Message:
  -----------
  [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (#114512)

The lsxintrin.h and and lasxintrin.h headers uses `signed char` vectors
instead of `unsigned char` vectors.  GCC also uses `signed char` for
them, so align their definition with the headers and GCC.

Depends on #114511.  Part of #110834 fix.

(cherry picked from commit 4006b28d102b09f4c736ef0f2664873305fedcd3)


  Commit: 499eae983bf433fc569231d36bc3dbabd0940bb5
      https://github.com/llvm/llvm-project/commit/499eae983bf433fc569231d36bc3dbabd0940bb5
  Author: Xi Ruoyao <xry111 at xry111.site>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsLoongArchLASX.def
    M clang/include/clang/Basic/BuiltinsLoongArchLSX.def
    M clang/test/Headers/lasxintrin.c
    M clang/test/Headers/lsxintrin.c

  Log Message:
  -----------
  [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (#114513)

The lsxintrin.h and and lasxintrin.h headers uses `unsigned char`
vectors instead of `signed char` vectors.  GCC also uses `unsigned char`
for them, so align their definition with the headers and GCC.

Fixes #110834.

Depends on #114512.

(cherry picked from commit 4f740f9d77cd038c8e55195fa189748e58ea6476)


Compare: https://github.com/llvm/llvm-project/compare/33c4723541d7...499eae983bf4

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