diff options
| author | Aiden Grossman <agrossman154@yahoo.com> | 2025-03-25 08:07:49 +0000 |
|---|---|---|
| committer | Aiden Grossman <agrossman154@yahoo.com> | 2025-03-25 08:10:58 +0000 |
| commit | e696f4e5008c21b8edee089fb80d4e2e0d998e20 (patch) | |
| tree | 82cfadefa49bab5519c551e8dc685475e93f8a23 | |
| parent | 847e46ca013fa1d296669bd341c4c48b74797cb6 (diff) | |
[llvm-exegesis] Fix LBR checks/testusers/ccc03-18-_yaml_nfc_precommit_wrong_test_case
This patch fixes the LBR check in the local lit config. The test would
segfault as the loop body would be basically empty, causing a divide by
zero error. More investigation is needed there so we do not actually hit
that assertion and report a cleaner error somewhere. Specifying an
actual opcode to benchmark fixes the problem. The test would also fail
as -mcpu was set to the default x86 CPU rather than the one currently
being run on, so it would always fail to find a perf counter. This patch
fixes that by simply removing the -mcpu flag.
Given these issues, I'm not sure these tests have ever run in the ~5
years they have been in tree. There were some issues reported in
\#132861, so I guess we'll see if there are further issues when the
testing becomes more broad.
| -rw-r--r-- | llvm/test/tools/llvm-exegesis/X86/lbr/mov-add.s | 2 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-exegesis/lit.local.cfg | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/tools/llvm-exegesis/X86/lbr/mov-add.s b/llvm/test/tools/llvm-exegesis/X86/lbr/mov-add.s index 2a8cc8e34450..250c29736779 100644 --- a/llvm/test/tools/llvm-exegesis/X86/lbr/mov-add.s +++ b/llvm/test/tools/llvm-exegesis/X86/lbr/mov-add.s @@ -1,4 +1,4 @@ -# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --repetition-mode=loop --x86-lbr-sample-period=521 --snippets-file=%p/Inputs/mov_add.att +# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mode=latency --repetition-mode=loop --x86-lbr-sample-period=521 --snippets-file=%p/Inputs/mov_add.att # REQUIRES: exegesis-can-execute-x86_64, exegesis-can-measure-latency-lbr diff --git a/llvm/test/tools/llvm-exegesis/lit.local.cfg b/llvm/test/tools/llvm-exegesis/lit.local.cfg index a51a2d73442f..89110ed2816c 100644 --- a/llvm/test/tools/llvm-exegesis/lit.local.cfg +++ b/llvm/test/tools/llvm-exegesis/lit.local.cfg @@ -20,7 +20,7 @@ def can_use_perf_counters(mode, extra_options=[]): return False try: return_code = subprocess.call( - [llvm_exegesis_exe, "-mode", mode, "-snippets-file", "/dev/null"] + [llvm_exegesis_exe, "-mode", mode, "-opcode-name=ADD64rr"] + extra_options, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, |
