[llvm] [utils][MCA] Add a helper script to create input-file-based tests (PR #190074)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 09:15:11 PDT 2026


================
@@ -0,0 +1,85 @@
+#!/usr/bin/env python3
+
+from pathlib import Path
+from os import path
+from argparse import ArgumentParser
+
+desc = """
+A simple script to create new llvm-mca tests from a set of input files. For each .s files under <input files folder>,
+it creates a corresponding .test file containing the RUN line, in which the llvm-mca command reads the input from the
+said .s file.
+
+Example Usage:
+```
+create_mca_tests.py --triple riscv64 --cpu generic-rv64 test/tools/llvm-mca/RISCV/Inputs test/tools/llvm-mca/RISCV/Generic
----------------
mshockwave wrote:

Oops I forgot to update the comment. They're aligned now (with underline used in the filename)

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


More information about the llvm-commits mailing list