Skip to content

Commit

Permalink
[X86] combineConcatVectorOps - add concat(ctpop)/concat(ctlz)/concat(…
Browse files Browse the repository at this point in the history
…cttz) handling
  • Loading branch information
RKSimon committed Jul 24, 2023
1 parent bcf728e commit de3f7f0
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 284 deletions.
11 changes: 11 additions & 0 deletions llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57465,6 +57465,17 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
ConcatSubOperand(SrcVT, Ops, 1));
}
break;
case ISD::CTPOP:
case ISD::CTTZ:
case ISD::CTLZ:
case ISD::CTTZ_ZERO_UNDEF:
case ISD::CTLZ_ZERO_UNDEF:
if (!IsSplat && ((VT.is256BitVector() && Subtarget.hasInt256()) ||
(VT.is512BitVector() && Subtarget.useBWIRegs()))) {
return DAG.getNode(Op0.getOpcode(), DL, VT,
ConcatSubOperand(VT, Ops, 0));
}
break;
case X86ISD::GF2P8AFFINEQB:
if (!IsSplat &&
(VT.is256BitVector() ||
Expand Down

0 comments on commit de3f7f0

Please sign in to comment.