[llvm] [X86] Use integer VT for second argument of X86ISD::VPERMILPV in combineConcatVectorOps. (PR #228257)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 23:49:22 PDT 2026
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/228257
>From 6f798597becdfc9b28f01b3d93fa92f03e1fb3f1 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Thu, 1 Oct 2026 14:44:30 -0700
Subject: [PATCH 1/2] [X86] Use integer VT for second argument of
X86ISD::VPERMILPV in combineConcatVectorOps.
---
llvm/lib/Target/X86/X86ISelLowering.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 7817c86155e5b..a0e221048ba76 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -61504,12 +61504,14 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
case X86ISD::VPERMILPV:
if (!IsSplat && (VT.is256BitVector() ||
(VT.is512BitVector() && Subtarget.useAVX512Regs()))) {
+ MVT IntVT = VT.changeVectorElementTypeToInteger();
SDValue Concat0 = CombineSubOperand(VT, Ops, 0);
- SDValue Concat1 = CombineSubOperand(VT, Ops, 1);
+ SDValue Concat1 = CombineSubOperand(IntVT, Ops, 1);
if (Concat0 || Concat1)
return DAG.getNode(Opcode, DL, VT,
Concat0 ? Concat0 : ConcatSubOperand(VT, Ops, 0),
- Concat1 ? Concat1 : ConcatSubOperand(VT, Ops, 1));
+ Concat1 ? Concat1
+ : ConcatSubOperand(IntVT, Ops, 1));
}
break;
case X86ISD::PSHUFB:
>From 23cf071c89c0b66d056bed04c29468f515d0bc63 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Thu, 1 Oct 2026 15:08:20 -0700
Subject: [PATCH 2/2] fixup! clang-format
---
llvm/lib/Target/X86/X86ISelLowering.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a0e221048ba76..81af171fdbeb3 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -61508,10 +61508,9 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
SDValue Concat0 = CombineSubOperand(VT, Ops, 0);
SDValue Concat1 = CombineSubOperand(IntVT, Ops, 1);
if (Concat0 || Concat1)
- return DAG.getNode(Opcode, DL, VT,
- Concat0 ? Concat0 : ConcatSubOperand(VT, Ops, 0),
- Concat1 ? Concat1
- : ConcatSubOperand(IntVT, Ops, 1));
+ return DAG.getNode(
+ Opcode, DL, VT, Concat0 ? Concat0 : ConcatSubOperand(VT, Ops, 0),
+ Concat1 ? Concat1 : ConcatSubOperand(IntVT, Ops, 1));
}
break;
case X86ISD::PSHUFB:
More information about the llvm-commits
mailing list