Skip to content

Commit ab2cbb8

Browse files
committed
[X86] LowerShiftByScalarVariable - remove 32-bit vXi64 bitcast shift amount handling
This was handled generically (and better) by D120553
1 parent 6dc456a commit ab2cbb8

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29338,7 +29338,6 @@ static SDValue LowerShiftByScalarVariable(SDValue Op, SelectionDAG &DAG,
2933829338
SDValue Amt = Op.getOperand(1);
2933929339
unsigned Opcode = Op.getOpcode();
2934029340
unsigned X86OpcI = getTargetVShiftUniformOpcode(Opcode, false);
29341-
unsigned X86OpcV = getTargetVShiftUniformOpcode(Opcode, true);
2934229341

2934329342
// TODO: Use getSplatSourceVector.
2934429343
if (SDValue BaseShAmt = DAG.getSplatValue(Amt)) {
@@ -29401,23 +29400,6 @@ static SDValue LowerShiftByScalarVariable(SDValue Op, SelectionDAG &DAG,
2940129400
}
2940229401
}
2940329402

29404-
// Check cases (mainly 32-bit) where i64 is expanded into high and low parts.
29405-
if (VT == MVT::v2i64 && Amt.getOpcode() == ISD::BITCAST &&
29406-
Amt.getOperand(0).getOpcode() == ISD::BUILD_VECTOR) {
29407-
Amt = Amt.getOperand(0);
29408-
unsigned Ratio = 64 / Amt.getScalarValueSizeInBits();
29409-
std::vector<SDValue> Vals(Ratio);
29410-
for (unsigned i = 0; i != Ratio; ++i)
29411-
Vals[i] = Amt.getOperand(i);
29412-
for (unsigned i = Ratio, e = Amt.getNumOperands(); i != e; i += Ratio) {
29413-
for (unsigned j = 0; j != Ratio; ++j)
29414-
if (Vals[j] != Amt.getOperand(i + j))
29415-
return SDValue();
29416-
}
29417-
29418-
if (supportedVectorShiftWithBaseAmnt(VT, Subtarget, Op.getOpcode()))
29419-
return DAG.getNode(X86OpcV, dl, VT, R, Op.getOperand(1));
29420-
}
2942129403
return SDValue();
2942229404
}
2942329405

0 commit comments

Comments
 (0)