-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEON] Wrong return type of NEON intrinsic vqrshrunh_n_s16 in arm_neon.h #71751
Labels
Comments
EugeneZelenko
added
backend:AArch64
clang:headers
Headers provided by Clang, e.g. for intrinsics
and removed
new issue
labels
Nov 9, 2023
@llvm/issue-subscribers-backend-aarch64 Author: Yi-Yen Chung (yyctw)
The NEON intrinsics `vqrshrunh_n_s16`, `vqrshruns_n_s32`, and `vqrshrund_n_s64` have the wrong return type in `arm_neon.h` in CLANG++-15. According to the ARM documentation https://developer.arm.com/architectures/instruction-sets/intrinsics/vqrshrunh_n_s16, these functions should return `uint8`, `uint16`, and `uint32`, respectively. However, in the header file `llvm-15/lib/clang/15.0.7/include/arm_neon.h`, the return value of these functions is of int type.
Reproduce problem: https://godbolt.org/z/5ebrG1MW1
Thank you for your reading. |
Looks like |
hlivin01
added a commit
to hlivin01/llvm-project
that referenced
this issue
Feb 6, 2024
vqrshrunh_n_s16, vqrshruns_n_s32, and vqrshrund_n_s64 in arm_neon.h * fixes llvm#71751 * changed return types in the table gen file responsible for generation of the problematic intrinsics * this is to ensure that the return type for the functions is the same as specified in the Arm Developer Documentation and avoid casting bugs (https://developer.arm.com/architectures/instruction-sets/intrinsics/vqrshrunh_n_s16) * updated lit tests to reflect the change in return type, worth noting that LLVM does not seems to differentiate signed and unsigned ints in the IR, hence the change in type cannot be checked in IR as far as I am aware
hlivin01
added a commit
to hlivin01/llvm-project
that referenced
this issue
Feb 6, 2024
vqrshrunh_n_s16, vqrshruns_n_s32, and vqrshrund_n_s64 in arm_neon.h * fixes llvm#71751 * changed return types in the table gen file responsible for generation of the problematic intrinsics * this is to ensure that the return type for the functions is the same as specified in the Arm Developer Documentation and avoid casting bugs (https://developer.arm.com/architectures/instruction-sets/intrinsics/vqrshrunh_n_s16) * updated lit tests to reflect the change in return type, worth noting that LLVM does not seems to differentiate signed and unsigned ints in the IR, hence the change in type cannot be checked in IR as far as I am aware
jthackray
pushed a commit
that referenced
this issue
Feb 6, 2024
…_s16, vqrshruns_n_s32, and vqrshrund_n_s64 in arm_neon.h (#80819) * fixes #71751 * changed return types in the table gen file responsible for generation of the problematic intrinsics * this is to ensure that the return type for the functions is the same as specified in the Arm Developer Documentation and avoid casting bugs (https://developer.arm.com/architectures/instruction-sets/intrinsics/vqrshrunh_n_s16) * updated lit tests to reflect the change in return type, worth noting that LLVM does not seems to differentiate signed and unsigned ints in the IR, hence the change in type cannot be checked in IR as far as I am aware
@llvm/issue-subscribers-backend-arm Author: Yi-Yen Chung (yyctw)
The NEON intrinsics `vqrshrunh_n_s16`, `vqrshruns_n_s32`, and `vqrshrund_n_s64` have the wrong return type in `arm_neon.h` in CLANG++-15. According to the ARM documentation https://developer.arm.com/architectures/instruction-sets/intrinsics/vqrshrunh_n_s16, these functions should return `uint8`, `uint16`, and `uint32`, respectively. However, in the header file `llvm-15/lib/clang/15.0.7/include/arm_neon.h`, the return value of these functions is of int type.
Reproduce problem: https://godbolt.org/z/5ebrG1MW1
Thank you for your reading. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The NEON intrinsics
vqrshrunh_n_s16
,vqrshruns_n_s32
, andvqrshrund_n_s64
have the wrong return type inarm_neon.h
in CLANG++-15. According to the ARM documentation https://developer.arm.com/architectures/instruction-sets/intrinsics/vqrshrunh_n_s16, these functions should returnuint8
,uint16
, anduint32
, respectively. However, in the header filellvm-15/lib/clang/15.0.7/include/arm_neon.h
, the return value of these functions is of int type.Reproduce problem: https://godbolt.org/z/5ebrG1MW1
CLANG version:
Thank you for your reading.
The text was updated successfully, but these errors were encountered: