[llvm] [RISCV][XCV] Add LLVM intrinsics for non-representable XCVsimd ops (PR #204880)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 08:21:48 PDT 2026
================
@@ -857,3 +857,236 @@ let Predicates = [HasVendorXCVmac, IsRV32] in {
def : PatCoreVMacGprGprGprUimm5<"macsRN", "MACSRN">;
def : PatCoreVMacGprGprGprUimm5<"machhsRN", "MACHHSRN">;
}
+
+//===----------------------------------------------------------------------===//
+// XCVsimd pseudo-instruction for cv.shuffle.sci.b
+//===----------------------------------------------------------------------===//
+// The hardware encodes the 8-bit shuffle immediate by splitting it across
+// four different opcodes: cv.shufflei0/1/2/3.sci.b, where bits [7:6] select
+// the opcode and bits [5:0] are the payload. This pseudo absorbs the full
+// 8-bit immediate; RISCVExpandPseudoInsts splits it into the correct real
----------------
topperc wrote:
Why do we need a pseudo for that? Can't we use PatFrags and SDNodeXForm to pick the correct instruction in tablegen?
https://github.com/llvm/llvm-project/pull/204880
More information about the llvm-commits
mailing list