From 89f3cff0f5f5fcf17004af0ebaf4059f7002d7ee Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 20 Mar 2006 08:14:16 +0000 Subject: [PATCH] Use tblgen'd VECTOR_SHUFFLE selection code. llvm-svn: 26900 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 16 ---------------- llvm/lib/Target/PowerPC/PPCInstrInfo.td | 5 ++--- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 39f544692687..7ddf8c0104dd 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -927,22 +927,6 @@ void PPCDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) { switch (N->getOpcode()) { default: break; - case ISD::VECTOR_SHUFFLE: - // FIXME: This should be autogenerated from the .td file, it is here for now - // due to bugs in tblgen. - if (Op.getOperand(1).getOpcode() == ISD::UNDEF && - (Op.getValueType() == MVT::v4f32 || Op.getValueType() == MVT::v4i32) && - PPC::isSplatShuffleMask(Op.getOperand(2).Val)) { - SDOperand N0; - Select(N0, N->getOperand(0)); - - Result = CodeGenMap[Op] = - SDOperand(CurDAG->getTargetNode(PPC::VSPLTW, MVT::v4f32, - getI32Imm(PPC::getVSPLTImmediate(Op.getOperand(2).Val)), - N0), 0); - return; - } - assert(0 && "ILLEGAL VECTOR_SHUFFLE!"); case ISD::SETCC: Result = SelectSETCC(Op); return; diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index 66e89dc09dcd..4817ec1fff7e 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -1034,9 +1034,8 @@ def VSPLTH : VXForm_1<588, (ops VRRC:$vD, u5imm:$UIMM, VRRC:$vB), def VSPLTW : VXForm_1<652, (ops VRRC:$vD, u5imm:$UIMM, VRRC:$vB), "vspltw $vD, $vB, $UIMM", VecPerm, - [/* - (set VRRC:$vD, (vector_shuffle (v4f32 VRRC:$vB), (undef), - VSPLT_shuffle_mask:$UIMM))*/]>; + [(set VRRC:$vD, (vector_shuffle (v4f32 VRRC:$vB), (undef), + VSPLT_shuffle_mask:$UIMM))]>; // FIXME: ALSO ADD SUPPORT FOR v4i32! // VX-Form Pseudo Instructions