Skip to content

Commit

Permalink
[X86] combineAnd - limit and(extract_vector_elt(shuffle(x)) -> extrac…
Browse files Browse the repository at this point in the history
…t_vector_elt(shuffle'(x)) fold to one use of the extract_vector_elt.

Prevents a regression in an upcoming patch.
  • Loading branch information
RKSimon committed Aug 3, 2023
1 parent 7f9b94c commit 4dcf687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48370,7 +48370,7 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
// Attempt to combine a scalar bitmask AND with an extracted shuffle.
if ((VT.getScalarSizeInBits() % 8) == 0 &&
N0.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
isa<ConstantSDNode>(N0.getOperand(1))) {
isa<ConstantSDNode>(N0.getOperand(1)) && N0->hasOneUse()) {
SDValue BitMask = N1;
SDValue SrcVec = N0.getOperand(0);
EVT SrcVecVT = SrcVec.getValueType();
Expand Down

0 comments on commit 4dcf687

Please sign in to comment.