Skip to content

[X86] combineX86ShuffleChain - prefer combining to X86ISD::SHUF128 if PERMQ operands are splittable #133900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39797,7 +39797,8 @@ static SDValue combineX86ShuffleChain(
// FIXME: Is there a better way to do this? is256BitLaneRepeatedShuffleMask
// doesn't work because our mask is for 128 bits and we don't have an MVT
// to match that.
bool PreferPERMQ = UnaryShuffle && isUndefOrInRange(ScaledMask[0], 0, 2) &&
bool PreferPERMQ = UnaryShuffle && !isFreeToSplitVector(V1, DAG) &&
isUndefOrInRange(ScaledMask[0], 0, 2) &&
isUndefOrInRange(ScaledMask[1], 0, 2) &&
isUndefOrInRange(ScaledMask[2], 2, 4) &&
isUndefOrInRange(ScaledMask[3], 2, 4) &&
Expand Down
Loading
Loading