llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.65k stars 11.84k forks source link

Clang allows unofficial ACLE intrinsics #46815

Closed pbarrio closed 3 years ago

pbarrio commented 4 years ago
Bugzilla Link 47471
Resolution FIXED
Resolved on Dec 24, 2020 07:11
Version trunk
OS All
CC @zygoloid

Extended Description

Clang supports the following C/C++ intrinsics:

vceqz_p16
vceqzq_p16
vmlaq_n_f64
vmlsq_n_f64

which are not part of the ACLE. These intrinsics are currently exposed through arm_neon.h, thus allowing developers to write code that will not be compatible with other toolchains (e.g. GNU).

For example a test.c as follows:

include

poly16x4_t neon_test(poly16x4_t a) { return vceqz_p16(a); }

Compiled with:

clang --target=aarch64-arm-none-eabi -c ~/test.c -o /dev/null

passes, but it should throw an error.

llvmbot commented 3 years ago

Resolved by https://reviews.llvm.org/D93206.