summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit6098b33515cc8c4f0cdbc8673403c64d17c428ba (patch)
treead78bd24040a78311967de3700587189f5f9faf4 /llvm/lib
parent1aebfa0a9b97778712be9ee9b3d99545bece76e5 (diff)
downloadbcm5719-llvm-6098b33515cc8c4f0cdbc8673403c64d17c428ba.tar.gz
bcm5719-llvm-6098b33515cc8c4f0cdbc8673403c64d17c428ba.zip
[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. llvm-svn: 191521
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Mips/MipsSEISelLowering.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/llvm/lib/Target/Mips/MipsSEISelLowering.cpp b/llvm/lib/Target/Mips/MipsSEISelLowering.cpp
index b05ab343413..52509b72d1b 100644
--- a/llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+++ b/llvm/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:
OpenPOWER on IntegriCloud