[llvm] [llvm-mca] Abort on parse error without -skip-unsupported-instructions (PR #90474)
Peter Waller via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 04:41:20 PDT 2024
================
@@ -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
----------------
peterwaller-arm wrote:
Reference: https://lab.llvm.org/buildbot/#/builders/60/builds/17086
I've just become aware that this appears to be failing on builders with messages like:
```
not c:\buildbot\as-builder-1\x-armv7l\build\bin\llvm-mca.exe C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\test\tools\llvm-mca\bad-input.s -o /dev/null 2>&1 | c:\buildbot\as-builder-1\x-armv7l\build\bin\filecheck.exe --check-prefixes=CHECK-ALL,CHECK C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\test\tools\llvm-mca\bad-input.s
# executed command: not 'c:\buildbot\as-builder-1\x-armv7l\build\bin\llvm-mca.exe' 'C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\test\tools\llvm-mca\bad-input.s' -o /dev/null
# executed command: 'c:\buildbot\as-builder-1\x-armv7l\build\bin\filecheck.exe' --check-prefixes=CHECK-ALL,CHECK 'C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\test\tools\llvm-mca\bad-input.s'
# .---command stderr------------
# | C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\test\tools\llvm-mca\bad-input.s:11:10: error: CHECK: expected string not found in input
# | # CHECK: error: Assembly input parsing had errors, use -skip-unsupported-instructions=parse-failure to drop failing lines from the input.
# | ^
# | <stdin>:1:1: note: scanning from here
# | 'skylake-avx512' is not a recognized processor for this target (ignoring processor)
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\test\tools\llvm-mca\bad-input.s
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: 'skylake-avx512' is not a recognized processor for this target (ignoring processor)
# | check:11 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: 'skylake-avx512' is not a recognized processor for this target (ignoring processor)
# | check:11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
```
The bots for which this have failed appear to be cross-compilers which don't have the native build target enabled.
It seems the safest immediate fix is to move/copy this test to x86/arm so that there is some coverage for this test for two common targets.
https://github.com/llvm/llvm-project/pull/90474
More information about the llvm-commits
mailing list