[llvm-commits] [llvm] r121276 - in /llvm/trunk/utils/TableGen: NeonEmitter.cpp NeonEmitter.h

Bob Wilson bob.wilson at apple.com
Wed Dec 8 12:09:10 PST 2010


Author: bwilson
Date: Wed Dec  8 14:09:10 2010
New Revision: 121276

URL: http://llvm.org/viewvc/llvm-project?rev=121276&view=rev
Log:
Add an operator for vaba so it can be implemented using vabd.

Modified:
    llvm/trunk/utils/TableGen/NeonEmitter.cpp
    llvm/trunk/utils/TableGen/NeonEmitter.h

Modified: llvm/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/NeonEmitter.cpp?rev=121276&r1=121275&r2=121276&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/NeonEmitter.cpp Wed Dec  8 14:09:10 2010
@@ -752,6 +752,9 @@
     s += ");";
     break;
   }
+  case OpAba:
+    s += "__a + " + MangleName("vabd", typestr, ClassS) + "(__b, __c);";
+    break;
   default:
     throw "unknown OpKind!";
     break;
@@ -1077,13 +1080,15 @@
 
   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);
   }
 

Modified: llvm/trunk/utils/TableGen/NeonEmitter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/NeonEmitter.h?rev=121276&r1=121275&r2=121276&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/NeonEmitter.h (original)
+++ llvm/trunk/utils/TableGen/NeonEmitter.h Wed Dec  8 14:09:10 2010
@@ -69,7 +69,8 @@
   OpRev16,
   OpRev32,
   OpRev64,
-  OpReinterpret
+  OpReinterpret,
+  OpAba
 };
 
 enum ClassKind {
@@ -137,6 +138,7 @@
       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");





More information about the llvm-commits mailing list