summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-12-08 20:09:10 +0000
committerBob Wilson <bob.wilson@apple.com>2010-12-08 20:09:10 +0000
commitf4f39d35cd30073362c04ab5c37dda6d646d4b0b (patch)
tree0051300d5a25a270787321d33e391a536e0b2d30 /utils
parent6b1207267f01877ff9b351786c902cb2ecd354c0 (diff)
downloadllvm-f4f39d35cd30073362c04ab5c37dda6d646d4b0b.tar.gz
llvm-f4f39d35cd30073362c04ab5c37dda6d646d4b0b.tar.bz2
llvm-f4f39d35cd30073362c04ab5c37dda6d646d4b0b.tar.xz
Add an operator for vaba so it can be implemented using vabd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/NeonEmitter.cpp9
-rw-r--r--utils/TableGen/NeonEmitter.h4
2 files changed, 10 insertions, 3 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp
index 7a623583f3..cb8cdb8091 100644
--- a/utils/TableGen/NeonEmitter.cpp
+++ b/utils/TableGen/NeonEmitter.cpp
@@ -752,6 +752,9 @@ static std::string GenOpString(OpKind op, const std::string &proto,
s += ");";
break;
}
+ case OpAba:
+ s += "__a + " + MangleName("vabd", typestr, ClassS) + "(__b, __c);";
+ break;
default:
throw "unknown OpKind!";
break;
@@ -1077,13 +1080,15 @@ void NeonEmitter::run(raw_ostream &OS) {
std::vector<Record*> RV = Records.getAllDerivedDefinitions("Inst");
- // Emit vmovl intrinsics first so they can be used by other intrinsics.
+ // Emit vmovl and vabd intrinsics first so they can be used by other
+ // intrinsics.
emitIntrinsic(OS, Records.getDef("VMOVL"));
+ emitIntrinsic(OS, Records.getDef("VABD"));
// Unique the return+pattern types, and assign them.
for (unsigned i = 0, e = RV.size(); i != e; ++i) {
Record *R = RV[i];
- if (R->getName() != "VMOVL")
+ if (R->getName() != "VMOVL" && R->getName() != "VABD")
emitIntrinsic(OS, R);
}
diff --git a/utils/TableGen/NeonEmitter.h b/utils/TableGen/NeonEmitter.h
index 6c0937b357..23b9f9c4e0 100644
--- a/utils/TableGen/NeonEmitter.h
+++ b/utils/TableGen/NeonEmitter.h
@@ -69,7 +69,8 @@ enum OpKind {
OpRev16,
OpRev32,
OpRev64,
- OpReinterpret
+ OpReinterpret,
+ OpAba
};
enum ClassKind {
@@ -137,6 +138,7 @@ namespace llvm {
OpMap["OP_REV32"] = OpRev32;
OpMap["OP_REV64"] = OpRev64;
OpMap["OP_REINT"] = OpReinterpret;
+ OpMap["OP_ABA"] = OpAba;
Record *SI = R.getClass("SInst");
Record *II = R.getClass("IInst");