[PATCH] D85118: [clang][AArch64] Correct return type of Neon vqmovun intrinsics

Mikhail Maltsev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 10:01:40 PDT 2020


miyuki added a comment.

For intrinsics that are plain functions (not macros) you could just check the signatures using assignments to function pointers, e.g.:

  #include <arm_neon.h>
  uint16_t (*fp1)(int32_t) = &vqmovuns_s32;



  $ clang -target=aarch64-arm-none-eabi -march=armv8-a+simd -c neon.c -fsyntax-only -Werror=incompatible-function-pointer-types
  neon.c:2:12: error: incompatible function pointer types initializing 'uint16_t (*)(int32_t)' (aka 'unsigned short (*)(int)') with an expression of type 'int16_t (*)(int32_t)' (aka 'short (*)(int)') [-Werror,-Wincompatible-function-pointer-types]
  uint16_t (*fp1)(int32_t) = &vqmovuns_s32;
             ^               ~~~~~~~~~~~~~
  1 error generated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85118/new/

https://reviews.llvm.org/D85118



More information about the cfe-commits mailing list