r192845 - [AArch64] Add support for NEON scalar negate instruction.
Chad Rosier
mcrosier at codeaurora.org
Wed Oct 16 14:04:54 PDT 2013
Author: mcrosier
Date: Wed Oct 16 16:04:53 2013
New Revision: 192845
URL: http://llvm.org/viewvc/llvm-project?rev=192845&view=rev
Log:
[AArch64] Add support for NEON scalar negate instruction.
Modified:
cfe/trunk/include/clang/Basic/arm_neon.td
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c
Modified: cfe/trunk/include/clang/Basic/arm_neon.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/arm_neon.td?rev=192845&r1=192844&r2=192845&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/arm_neon.td (original)
+++ cfe/trunk/include/clang/Basic/arm_neon.td Wed Oct 16 16:04:53 2013
@@ -864,6 +864,10 @@ def SCALAR_ABS : SInst<"vabs", "ss", "Sl
def SCALAR_SQABS : SInst<"vqabs", "ss", "ScSsSiSl">;
////////////////////////////////////////////////////////////////////////////////
+// Scalar Negate
+def SCALAR_NEG : SInst<"vneg", "ss", "Sl">;
+
+////////////////////////////////////////////////////////////////////////////////
// Scalar Signed Saturating Negate
def SCALAR_SQNEG : SInst<"vqneg", "ss", "ScSsSiSl">;
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=192845&r1=192844&r2=192845&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Oct 16 16:04:53 2013
@@ -2085,6 +2085,10 @@ static Value *EmitAArch64ScalarBuiltinEx
case AArch64::BI__builtin_neon_vqabsd_s64:
Int = Intrinsic::arm_neon_vqabs;
s = "vqabs"; OverloadInt = true; break;
+ // Scalar Negate
+ case AArch64::BI__builtin_neon_vnegd_s64:
+ Int = Intrinsic::aarch64_neon_vneg;
+ s = "vneg"; OverloadInt = false; break;
// Scalar Signed Saturating Negate
case AArch64::BI__builtin_neon_vqnegb_s8:
case AArch64::BI__builtin_neon_vqnegh_s16:
Modified: cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c?rev=192845&r1=192844&r2=192845&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c (original)
+++ cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c Wed Oct 16 16:04:53 2013
@@ -7148,6 +7148,12 @@ int64_t test_vqabsd_s64(int64_t a) {
return (int64_t)vqabsd_s64(a);
}
+int64_t test_vnegd_s64(int64_t a) {
+// CHECK: test_vnegd_s64
+// CHECK: neg {{d[0-9]+}}, {{d[0-9]+}}
+ return (int64_t)vnegd_s64(a);
+}
+
int8_t test_vqnegb_s8(int8_t a) {
// CHECK: test_vqnegb_s8
// CHECK: sqneg {{b[0-9]+}}, {{b[0-9]+}}
More information about the cfe-commits
mailing list