[llvm] [X86] combineConcatVectorOps - add generic shift handling (PR #221055)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 4 03:00:10 PDT 2026
================
@@ -61606,6 +61606,19 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
Concat1 ? Concat1 : ConcatSubOperand(VT, Ops, 1));
}
break;
+ case ISD::SHL:
+ case ISD::SRL:
+ case ISD::SRA:
+ if (!IsSplat && ((VT.is256BitVector() && Subtarget.hasInt256()) ||
+ (VT.is512BitVector() && Subtarget.useAVX512Regs() &&
+ (EltSizeInBits >= 32 || Subtarget.useBWIRegs())))) {
+ // We need the value being shifted to be concatenated for free to
+ // typically make this worthwhile.
+ if (SDValue Concat0 = CombineSubOperand(VT, Ops, 0))
+ return DAG.getNode(Opcode, DL, VT, Concat0,
+ ConcatSubOperand(VT, Ops, 1));
----------------
RKSimon wrote:
Yes, they are :)
https://github.com/llvm/llvm-project/pull/221055
More information about the llvm-commits
mailing list