[llvm] afc10fc - [llvm-mca] Move bad-input.s test to be target specific
Peter Waller via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 04:50:42 PDT 2024
Author: Peter Waller
Date: 2024-05-07T12:50:20+01:00
New Revision: afc10fc9b7ce3d23d9012f5a1496e849fe873ba2
URL: https://github.com/llvm/llvm-project/commit/afc10fc9b7ce3d23d9012f5a1496e849fe873ba2
DIFF: https://github.com/llvm/llvm-project/commit/afc10fc9b7ce3d23d9012f5a1496e849fe873ba2.diff
LOG: [llvm-mca] Move bad-input.s test to be target specific
... for now.
This is a follow up to #90474 in response to build bot failures.
This test is intended to check a case where invalid assembly is passed
to llvm-mca.
Unfortunately it appears that a cross-toolchain built with
-DTOOLCHAIN_TARGET_TRIPLE does not have an llvm-mca which works out of
the box if the host target is not enabled.
As a quick fix to make the build bots green, move the test into AArch64
and X86 so that there is reasonable coverage for this test; later I hope
mca can be fixed to work out of the box in this configuration.
Added:
llvm/test/tools/llvm-mca/AArch64/bad-input.s
llvm/test/tools/llvm-mca/X86/bad-input.s
Modified:
Removed:
llvm/test/tools/llvm-mca/bad-input.s
################################################################################
diff --git a/llvm/test/tools/llvm-mca/bad-input.s b/llvm/test/tools/llvm-mca/AArch64/bad-input.s
similarity index 100%
rename from llvm/test/tools/llvm-mca/bad-input.s
rename to llvm/test/tools/llvm-mca/AArch64/bad-input.s
diff --git a/llvm/test/tools/llvm-mca/X86/bad-input.s b/llvm/test/tools/llvm-mca/X86/bad-input.s
new file mode 100644
index 0000000000000..eaf69979cb201
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/bad-input.s
@@ -0,0 +1,14 @@
+# RUN: not llvm-mca %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -skip-unsupported-instructions=none %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -skip-unsupported-instructions=lack-sched %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -skip-unsupported-instructions=parse-failure %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
+# RUN: not llvm-mca -skip-unsupported-instructions=any %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
+
+# Test checks that MCA does not produce a total cycles estimate if it encounters parse errors.
+
+# CHECK-ALL-NOT: Total Cycles:
+
+# CHECK: error: Assembly input parsing had errors, use -skip-unsupported-instructions=parse-failure to drop failing lines from the input.
+# CHECK-SKIP: error: no assembly instructions found.
+
+This is not a valid assembly file for any architecture (by virtue of this text.)
More information about the llvm-commits
mailing list