Skip to content

Commit 65dc011

Browse files
committed
fixup!
1 parent ad22cd7 commit 65dc011

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ bool MipsDAGToDAGISel::selectVSplatMaskR(SDValue N, SDValue &Imm) const {
177177

178178
bool MipsDAGToDAGISel::selectVSplatImmEq1(SDValue N) const {
179179
llvm_unreachable("Unimplemented function.");
180-
return false;
181180
}
182181

183182
/// Convert vector addition with vector subtraction if that allows to encode

llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -564,18 +564,6 @@ selectVSplatCommon(SDValue N, SDValue &Imm, bool Signed,
564564
return false;
565565
}
566566

567-
// Select const vector splat of 1.
568-
bool MipsSEDAGToDAGISel::selectVSplatImmEq1(SDValue N) const {
569-
EVT EltTy = N->getValueType(0).getVectorElementType();
570-
571-
if (N->getOpcode() == ISD::BITCAST)
572-
N = N->getOperand(0);
573-
574-
APInt Imm;
575-
return selectVSplat(N.getNode(), Imm, EltTy.getSizeInBits()) &&
576-
Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1;
577-
}
578-
579567
// Select constant vector splats whose value is a power of 2.
580568
//
581569
// In addition to the requirements of selectVSplat(), this function returns
@@ -691,6 +679,18 @@ bool MipsSEDAGToDAGISel::selectVSplatUimmInvPow2(SDValue N,
691679
return false;
692680
}
693681

682+
// Select const vector splat of 1.
683+
bool MipsSEDAGToDAGISel::selectVSplatImmEq1(SDValue N) const {
684+
APInt ImmValue;
685+
EVT EltTy = N->getValueType(0).getVectorElementType();
686+
687+
if (N->getOpcode() == ISD::BITCAST)
688+
N = N->getOperand(0);
689+
690+
return selectVSplat(N.getNode(), ImmValue, EltTy.getSizeInBits()) &&
691+
ImmValue.getBitWidth() == EltTy.getSizeInBits() && ImmValue == 1;
692+
}
693+
694694
bool MipsSEDAGToDAGISel::trySelect(SDNode *Node) {
695695
unsigned Opcode = Node->getOpcode();
696696
SDLoc DL(Node);

0 commit comments

Comments
 (0)