Skip to content
Snippets Groups Projects
Commit 361afe4e authored by Bob Wilson's avatar Bob Wilson
Browse files

Add an operator for vdup_lane so it can be implemented without a clang builtin.

llvm-svn: 121190
parent 7f3c0aa9
No related branches found
No related tags found
No related merge requests found
......@@ -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 + ")";
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment