[llvm] [RISCV] Split vector FP pseudo instructions by SEW. NFC. (PR #87686)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 10:03:17 PDT 2024
================
@@ -2603,31 +2603,54 @@ std::string RISCVInstrInfo::createMIROperandComment(
}
// clang-format off
-#define CASE_VFMA_OPCODE_COMMON(OP, TYPE, LMUL) \
+#define CASE_VMA_OPCODE_COMMON(OP, TYPE, LMUL) \
RISCV::PseudoV##OP##_##TYPE##_##LMUL
-#define CASE_VFMA_OPCODE_LMULS_M1(OP, TYPE) \
- CASE_VFMA_OPCODE_COMMON(OP, TYPE, M1): \
- case CASE_VFMA_OPCODE_COMMON(OP, TYPE, M2): \
- case CASE_VFMA_OPCODE_COMMON(OP, TYPE, M4): \
- case CASE_VFMA_OPCODE_COMMON(OP, TYPE, M8)
+#define CASE_VMA_OPCODE_LMULS_M1(OP, TYPE) \
+ CASE_VMA_OPCODE_COMMON(OP, TYPE, M1): \
+ case CASE_VMA_OPCODE_COMMON(OP, TYPE, M2): \
+ case CASE_VMA_OPCODE_COMMON(OP, TYPE, M4): \
+ case CASE_VMA_OPCODE_COMMON(OP, TYPE, M8)
-#define CASE_VFMA_OPCODE_LMULS_MF2(OP, TYPE) \
- CASE_VFMA_OPCODE_COMMON(OP, TYPE, MF2): \
- case CASE_VFMA_OPCODE_LMULS_M1(OP, TYPE)
+#define CASE_VMA_OPCODE_LMULS_MF2(OP, TYPE) \
+ CASE_VMA_OPCODE_COMMON(OP, TYPE, MF2): \
+ case CASE_VMA_OPCODE_LMULS_M1(OP, TYPE)
-#define CASE_VFMA_OPCODE_LMULS_MF4(OP, TYPE) \
- CASE_VFMA_OPCODE_COMMON(OP, TYPE, MF4): \
- case CASE_VFMA_OPCODE_LMULS_MF2(OP, TYPE)
+#define CASE_VMA_OPCODE_LMULS_MF4(OP, TYPE) \
+ CASE_VMA_OPCODE_COMMON(OP, TYPE, MF4): \
+ case CASE_VMA_OPCODE_LMULS_MF2(OP, TYPE)
-#define CASE_VFMA_OPCODE_LMULS(OP, TYPE) \
- CASE_VFMA_OPCODE_COMMON(OP, TYPE, MF8): \
- case CASE_VFMA_OPCODE_LMULS_MF4(OP, TYPE)
+#define CASE_VMA_OPCODE_LMULS(OP, TYPE) \
+ CASE_VMA_OPCODE_COMMON(OP, TYPE, MF8): \
+ case CASE_VMA_OPCODE_LMULS_MF4(OP, TYPE)
+
+// VFMA instructions are SEW specific.
+#define CASE_VFMA_OPCODE_COMMON(OP, TYPE, LMUL, SEW) \
+ RISCV::PseudoV##OP##_##TYPE##_##LMUL##_##SEW
+
+#define CASE_VFMA_OPCODE_LMULS_M1(OP, TYPE, SEW) \
+ CASE_VFMA_OPCODE_COMMON(OP, TYPE, M1, SEW): \
+ case CASE_VFMA_OPCODE_COMMON(OP, TYPE, M2, SEW): \
+ case CASE_VFMA_OPCODE_COMMON(OP, TYPE, M4, SEW): \
+ case CASE_VFMA_OPCODE_COMMON(OP, TYPE, M8, SEW)
+
+#define CASE_VFMA_OPCODE_LMULS_MF2(OP, TYPE, SEW) \
+ CASE_VFMA_OPCODE_COMMON(OP, TYPE, MF2, SEW): \
+ case CASE_VFMA_OPCODE_LMULS_M1(OP, TYPE, SEW)
+
+#define CASE_VFMA_OPCODE_LMULS_MF4(OP, TYPE, SEW) \
+ CASE_VFMA_OPCODE_COMMON(OP, TYPE, MF4, SEW): \
+ case CASE_VFMA_OPCODE_LMULS_MF2(OP, TYPE, SEW)
+
+#define CASE_VFMA_OPCODE_VV(OP) \
+ CASE_VFMA_OPCODE_COMMON(OP, VV, MF4, E16): \
----------------
michaelmaitland wrote:
I just pushed a commit which was failing because I forgot to update checks for E64.
https://github.com/llvm/llvm-project/pull/87686
More information about the llvm-commits
mailing list