]> granicus.if.org Git - clang/commitdiff
Add the __qdbl intrinsic to the arm_acle.h header
authorRenato Golin <renato.golin@linaro.org>
Thu, 3 Jul 2014 10:14:52 +0000 (10:14 +0000)
committerRenato Golin <renato.golin@linaro.org>
Thu, 3 Jul 2014 10:14:52 +0000 (10:14 +0000)
Patch by: Moritz Roth

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212264 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/arm_acle.h
test/CodeGen/arm_acle.c

index ed48d80a59fc3b36ff9931b3dfdf620e9393881b..ef8de378879ee4cd2c685428575bc09275ec9856 100644 (file)
@@ -90,6 +90,11 @@ static __inline__ int32_t __attribute__((always_inline, nodebug))
   __qsub(int32_t t, int32_t v) {
   return __builtin_arm_qsub(t, v);
 }
+
+static __inline__ int32_t __attribute__((always_inline, nodebug))
+__qdbl(int32_t t) {
+  return __builtin_arm_qadd(t, t);
+}
 #endif
 
 /* CRC32 intrinsics */
index f766a8b9753420e2b1bc70f03631c04b2da4863a..88d58a40b1f991f0abf8b8a589137e76979839c5 100644 (file)
@@ -66,6 +66,15 @@ int32_t test_qadd(int32_t a, int32_t b) {
 int32_t test_qsub(int32_t a, int32_t b) {
   return __qsub(a, b);
 }
+
+extern int32_t f();
+// AArch32-LABEL: test_qdbl
+// AArch32: [[VAR:%[a-z0-9]+]] = {{.*}} call {{.*}} @f
+// AArch32-NOT: call {{.*}} @f
+// AArch32: call i32 @llvm.arm.qadd(i32 [[VAR]], i32 [[VAR]])
+int32_t test_qdbl() {
+  return __qdbl(f());
+}
 #endif
 
 /* CRC32 intrinsics */