[llvm] [RISCV] Use CONCAT_VECTORS instead of INSERT_SUBVECTOR. NFC. (PR #164226)
Jim Lin via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 02:27:39 PDT 2025
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/164226
None
>From 45265a90b3ac276e660ca726ac8ed4f7b9a2b8b2 Mon Sep 17 00:00:00 2001
From: Jim Lin <jim at andestech.com>
Date: Mon, 20 Oct 2025 15:18:10 +0800
Subject: [PATCH] [RISCV] Use CONCAT_VECTORS instead of INSERT_SUBVECTOR. NFC.
---
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index eb875583ffca4..022d0268f8736 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -12649,10 +12649,7 @@ SDValue RISCVTargetLowering::lowerVECTOR_REVERSE(SDValue Op,
Lo = DAG.getNode(ISD::VECTOR_REVERSE, DL, LoVT, Lo);
Hi = DAG.getNode(ISD::VECTOR_REVERSE, DL, HiVT, Hi);
// Reassemble the low and high pieces reversed.
- // FIXME: This is a CONCAT_VECTORS.
- SDValue Res = DAG.getInsertSubvector(DL, DAG.getUNDEF(VecVT), Hi, 0);
- return DAG.getInsertSubvector(DL, Res, Lo,
- LoVT.getVectorMinNumElements());
+ return DAG.getNode(ISD::CONCAT_VECTORS, DL, VecVT, Hi, Lo);
}
// Just promote the int type to i16 which will double the LMUL.
More information about the llvm-commits
mailing list