summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtins-arm64.c
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2019-07-16 09:27:39 +0000
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>2019-07-16 09:27:39 +0000
commiteb72138340ce36f3bdd29658eb2ff730cbaa25d7 (patch)
tree9f0b4cb65311b729eeb000e06dae408a5ea5fcde /clang/test/CodeGen/builtins-arm64.c
parentc5a2d7470e10576684bc9a74626d96db8ff069f1 (diff)
downloadbcm5719-llvm-eb72138340ce36f3bdd29658eb2ff730cbaa25d7.tar.gz
bcm5719-llvm-eb72138340ce36f3bdd29658eb2ff730cbaa25d7.zip
[AArch64] Implement __jcvt intrinsic from Armv8.3-A
The jcvt intrinsic defined in ACLE [1] is available when ARM_FEATURE_JCVT is defined. This change introduces the AArch64 intrinsic, wires it up to the instruction and a new clang builtin function. The __ARM_FEATURE_JCVT macro is now defined when an Armv8.3-A or higher target is used. I've implemented the target detection logic in Clang so that this feature is enabled for architectures from armv8.3-a onwards (so -march=armv8.4-a also enables this, for example). make check-all didn't show any new failures. [1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics Differential Revision: https://reviews.llvm.org/D64495 llvm-svn: 366197
Diffstat (limited to 'clang/test/CodeGen/builtins-arm64.c')
-rw-r--r--clang/test/CodeGen/builtins-arm64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtins-arm64.c b/clang/test/CodeGen/builtins-arm64.c
index f164c2f6f36..5ec63fba82b 100644
--- a/clang/test/CodeGen/builtins-arm64.c
+++ b/clang/test/CodeGen/builtins-arm64.c
@@ -58,6 +58,12 @@ void prefetch() {
// CHECK: call {{.*}} @llvm.prefetch(i8* null, i32 0, i32 3, i32 0)
}
+int32_t jcvt(double v) {
+ //CHECK-LABEL: @jcvt(
+ //CHECK: call i32 @llvm.aarch64.fjcvtzs
+ return __builtin_arm_jcvt(v);
+}
+
__typeof__(__builtin_arm_rsr("1:2:3:4:5")) rsr(void);
uint32_t rsr() {
OpenPOWER on IntegriCloud