Add an operator for vdup_lane so it can be implemented without a clang builtin.
authorBob Wilson <bob.wilson@apple.com>
Tue, 7 Dec 2010 22:39:24 +0000 (22:39 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 7 Dec 2010 22:39:24 +0000 (22:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121190 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/NeonEmitter.cpp
utils/TableGen/NeonEmitter.h

index d3a068091ce080c849a604547e5cc583f7e4cca6..9b38b5eefa16ac3144468544f2e6c5f4fa2ee959 100644 (file)
@@ -680,6 +680,9 @@ static std::string GenOpString(OpKind op, const std::string &proto,
   case OpDup:
     s += Duplicate(nElts, typestr, "__a") + ";";
     break;
+  case OpDupLane:
+    s += SplatLane(nElts, "__a", "__b") + ";";
+    break;
   case OpSelect:
     // ((0 & 1) | (~0 & 2))
     s += "(" + ts + ")";
index 5351bbe75cd3a6df5c9ed4295d765abaa08908f1..f157b097cbdb356b915c32e0d8cd6dc9d1e31f15 100644 (file)
@@ -52,6 +52,7 @@ enum OpKind {
   OpCast,
   OpConcat,
   OpDup,
+  OpDupLane,
   OpHi,
   OpLo,
   OpSelect,
@@ -110,6 +111,7 @@ namespace llvm {
       OpMap["OP_HI"]    = OpHi;
       OpMap["OP_LO"]    = OpLo;
       OpMap["OP_DUP"]   = OpDup;
+      OpMap["OP_DUP_LN"] = OpDupLane;
       OpMap["OP_SEL"]   = OpSelect;
       OpMap["OP_REV16"] = OpRev16;
       OpMap["OP_REV32"] = OpRev32;