r212264 - Add the __qdbl intrinsic to the arm_acle.h header

Renato Golin renato.golin at linaro.org
Thu Jul 3 03:14:53 PDT 2014


Author: rengolin
Date: Thu Jul  3 05:14:52 2014
New Revision: 212264

URL: http://llvm.org/viewvc/llvm-project?rev=212264&view=rev
Log:
Add the __qdbl intrinsic to the arm_acle.h header

Patch by: Moritz Roth

Modified:
    cfe/trunk/lib/Headers/arm_acle.h
    cfe/trunk/test/CodeGen/arm_acle.c

Modified: cfe/trunk/lib/Headers/arm_acle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/arm_acle.h?rev=212264&r1=212263&r2=212264&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/arm_acle.h (original)
+++ cfe/trunk/lib/Headers/arm_acle.h Thu Jul  3 05:14:52 2014
@@ -90,6 +90,11 @@ static __inline__ int32_t __attribute__(
   __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 */

Modified: cfe/trunk/test/CodeGen/arm_acle.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm_acle.c?rev=212264&r1=212263&r2=212264&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/arm_acle.c (original)
+++ cfe/trunk/test/CodeGen/arm_acle.c Thu Jul  3 05:14:52 2014
@@ -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 */





More information about the cfe-commits mailing list