summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsSEISelLowering.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2013-09-27 13:36:54 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2013-09-27 13:36:54 +0000
commit4d835f1cbe5d8c5f6cea4040bea9b180927a1c05 (patch)
treed243473606125f7ff04b142cbbc52671e6a4a0c7 /lib/Target/Mips/MipsSEISelLowering.cpp
parentcca114611945332852094fcadfaa4ffbd012bfb3 (diff)
downloadllvm-4d835f1cbe5d8c5f6cea4040bea9b180927a1c05.tar.gz
llvm-4d835f1cbe5d8c5f6cea4040bea9b180927a1c05.tar.bz2
llvm-4d835f1cbe5d8c5f6cea4040bea9b180927a1c05.tar.xz
[mips][msa] Implemented insert.d intrinsic.
This intrinsic is lowered into an equivalent INSERT_VECTOR_ELT which is further lowered into a sequence of insert.w's on MIPS32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsSEISelLowering.cpp')
-rw-r--r--lib/Target/Mips/MipsSEISelLowering.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/Target/Mips/MipsSEISelLowering.cpp b/lib/Target/Mips/MipsSEISelLowering.cpp
index b05ab34341..52509b72d1 100644
--- a/lib/Target/Mips/MipsSEISelLowering.cpp
+++ b/lib/Target/Mips/MipsSEISelLowering.cpp
@@ -1048,19 +1048,6 @@ static SDValue lowerMSACopyIntr(SDValue Op, SelectionDAG &DAG, unsigned Opc) {
return Result;
}
-// Lower an MSA insert intrinsic into the specified SelectionDAG node
-static SDValue lowerMSAInsertIntr(SDValue Op, SelectionDAG &DAG, unsigned Opc) {
- SDLoc DL(Op);
- SDValue Op0 = Op->getOperand(1);
- SDValue Op1 = Op->getOperand(2);
- SDValue Op2 = Op->getOperand(3);
- EVT ResTy = Op->getValueType(0);
-
- SDValue Result = DAG.getNode(Opc, DL, ResTy, Op0, Op2, Op1);
-
- return Result;
-}
-
static SDValue
lowerMSASplatImm(SDLoc DL, EVT ResTy, SDValue ImmOp, SelectionDAG &DAG) {
EVT ViaVecTy = ResTy;
@@ -1381,7 +1368,9 @@ SDValue MipsSETargetLowering::lowerINTRINSIC_WO_CHAIN(SDValue Op,
case Intrinsic::mips_insert_b:
case Intrinsic::mips_insert_h:
case Intrinsic::mips_insert_w:
- return lowerMSAInsertIntr(Op, DAG, ISD::INSERT_VECTOR_ELT);
+ case Intrinsic::mips_insert_d:
+ return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(Op), Op->getValueType(0),
+ Op->getOperand(1), Op->getOperand(3), Op->getOperand(2));
case Intrinsic::mips_ldi_b:
case Intrinsic::mips_ldi_h:
case Intrinsic::mips_ldi_w: