[llvm] [X86] combineConcatVectorOps - add concatenation handling for BITCAST + AssertSext/AssertZext nodes (PR #133913)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 06:32:58 PDT 2025


================
@@ -58134,6 +58135,40 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
 
     unsigned Opcode = Op0.getOpcode();
     switch (Opcode) {
+    case ISD::AssertSext:
+    case ISD::AssertZext: {
+      if (!IsSplat && llvm::all_of(Ops, [Op0](SDValue Op) {
+            return Op0.getOperand(1) == Op.getOperand(1);
----------------
RKSimon wrote:

That's the second operand (the ValueType VTSDNode which is a scalar type) that has to be the same so the concatenated version can share it - the first source operands won't be the same.

https://github.com/llvm/llvm-project/pull/133913


More information about the llvm-commits mailing list