[llvm] 458d706 - [llvm-mca] Make bad-input.s even more CPU specific

Peter Waller via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 05:11:18 PDT 2024


Author: Peter Waller
Date: 2024-05-07T13:10:40+01:00
New Revision: 458d70674190c4d043d5dfd2e41aecddff5cdb69

URL: https://github.com/llvm/llvm-project/commit/458d70674190c4d043d5dfd2e41aecddff5cdb69
DIFF: https://github.com/llvm/llvm-project/commit/458d70674190c4d043d5dfd2e41aecddff5cdb69.diff

LOG: [llvm-mca] Make bad-input.s even more CPU specific

Note: This patch is distinct from the previous one titled
  "[llvm-mca] Move bad-input.s test to be target specific"

This is a followup to #90474 and commit
afc10fc9b7ce3d23d9012f5a1496e849fe873ba2

Context: Builders failing because they're unable to run the failure
test.

This still doesn't work in various circumstances, it seems MCA doesn't
want to run on a wide variety of hosts in various configurations, so
stick to the tried and tested method and pass -mtriple and -mcpu.

Added: 
    llvm/test/tools/llvm-mca/AArch64/Neoverse/bad-input.s

Modified: 
    llvm/test/tools/llvm-mca/X86/bad-input.s

Removed: 
    llvm/test/tools/llvm-mca/AArch64/bad-input.s


################################################################################
diff  --git a/llvm/test/tools/llvm-mca/AArch64/Neoverse/bad-input.s b/llvm/test/tools/llvm-mca/AArch64/Neoverse/bad-input.s
new file mode 100644
index 0000000000000..41891adc6c0dc
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/AArch64/Neoverse/bad-input.s
@@ -0,0 +1,16 @@
+# This test is generic but not all builders have an llvm-mca which can run natively.
+
+# RUN: not llvm-mca -mtriple=aarch64 -mcpu=neoverse-v1 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -mtriple=aarch64 -mcpu=neoverse-v1 -skip-unsupported-instructions=none %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -mtriple=aarch64 -mcpu=neoverse-v1 -skip-unsupported-instructions=lack-sched %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -mtriple=aarch64 -mcpu=neoverse-v1 -skip-unsupported-instructions=parse-failure %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
+# RUN: not llvm-mca -mtriple=aarch64 -mcpu=neoverse-v1 -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.)

diff  --git a/llvm/test/tools/llvm-mca/AArch64/bad-input.s b/llvm/test/tools/llvm-mca/AArch64/bad-input.s
deleted file mode 100644
index eaf69979cb201..0000000000000
--- a/llvm/test/tools/llvm-mca/AArch64/bad-input.s
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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.)

diff  --git a/llvm/test/tools/llvm-mca/X86/bad-input.s b/llvm/test/tools/llvm-mca/X86/bad-input.s
index eaf69979cb201..b49bccc45b2dc 100644
--- a/llvm/test/tools/llvm-mca/X86/bad-input.s
+++ b/llvm/test/tools/llvm-mca/X86/bad-input.s
@@ -1,8 +1,10 @@
-# 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
+# This test is generic but not all builders have an llvm-mca which can run natively.
+
+# RUN: not llvm-mca -mtriple=x86_64 -mcpu=x86-64 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -mtriple=x86_64 -mcpu=x86-64 -skip-unsupported-instructions=none %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -mtriple=x86_64 -mcpu=x86-64 -skip-unsupported-instructions=lack-sched %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK %s
+# RUN: not llvm-mca -mtriple=x86_64 -mcpu=x86-64 -skip-unsupported-instructions=parse-failure %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK-ALL,CHECK-SKIP %s
+# RUN: not llvm-mca -mtriple=x86_64 -mcpu=x86-64 -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.
 


        


More information about the llvm-commits mailing list