This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis][AArch64] Add return statement at the end of the snippet correctly
ClosedPublic

Authored by kpdev42 on Apr 6 2023, 4:31 AM.

Details

Summary

Currently llvm-exegesis fails to do this which causes every snippet to crash

~~

Huawei RRI, OS Lab

Diff Detail

Event Timeline

kpdev42 created this revision.Apr 6 2023, 4:31 AM
kpdev42 requested review of this revision.Apr 6 2023, 4:31 AM
kpdev42 edited the summary of this revision. (Show Details)Apr 6 2023, 4:37 AM
courbet accepted this revision.Apr 6 2023, 4:40 AM
This revision is now accepted and ready to land.Apr 6 2023, 4:40 AM
This revision was landed with ongoing or failed builds.Apr 6 2023, 4:57 AM
This revision was automatically updated to reflect the committed changes.

Hi, this test is failing on s390x, with this error:

FAIL: LLVM :: tools/llvm-exegesis/AArch64/add-return.s (43034 of 46221)
******************** TEST 'LLVM :: tools/llvm-exegesis/AArch64/add-return.s' FAILED ********************
Script:
--
: 'RUN: at line 1';   /builddir/build/BUILD/llvm-17.0.0.src/redhat-linux-build/bin/llvm-exegesis --opcode-name=ADDv16i8 --mcpu=cortex-a78 --mtriple=aarch64-linux-gnu                --mode=latency --benchmark-phase=assemble-measured-code 2>&1 | /builddir/build/BUILD/llvm-17.0.0.src/redhat-linux-build/bin/FileCheck /builddir/build/BUILD/llvm-17.0.0.src/test/tools/llvm-exegesis/AArch64/add-return.s
--
Exit Code: 1

Command Output (stderr):
--
/builddir/build/BUILD/llvm-17.0.0.src/test/tools/llvm-exegesis/AArch64/add-return.s:5:10: error: CHECK: expected string not found in input
# CHECK: assembled_snippet: {{.*}}C0035FD6
         ^
<stdin>:1:1: note: scanning from here
setRegTo is not implemented, results will be unreliable
^
<stdin>:5:200: note: possible intended match here
0. Program arguments: /builddir/build/BUILD/llvm-17.0.0.src/redhat-linux-build/bin/llvm-exegesis --opcode-name=ADDv16i8 --mcpu=cortex-a78 --mtriple=aarch64-linux-gnu --mode=latency --benchmark-phase=assemble-measured-code
                                                                                                                                                                                                       ^

Input file: <stdin>
Check file: /builddir/build/BUILD/llvm-17.0.0.src/test/tools/llvm-exegesis/AArch64/add-return.s

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: setRegTo is not implemented, results will be unreliable 
check:5'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: setRegTo is not implemented, results will be unreliable 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4: Stack dump: 
check:5'0     ~~~~~~~~~~~~
           5: 0. Program arguments: /builddir/build/BUILD/llvm-17.0.0.src/redhat-linux-build/bin/llvm-exegesis --opcode-name=ADDv16i8 --mcpu=cortex-a78 --mtriple=aarch64-linux-gnu --mode=latency --benchmark-phase=assemble-measured-code 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:5'1                                                                                                                                                                                                            ?                       possible intended match
           6:  #0 0x0000000002c0f012 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /builddir/build/BUILD/llvm-17.0.0.src/lib/Support/Unix/Signals.inc:602:13 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7:  #1 0x0000000002c0faf0 llvm::sys::RunSignalHandlers() /builddir/build/BUILD/llvm-17.0.0.src/lib/Support/Signals.cpp:105:18 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           8:  #2 0x0000000002c0faf0 SignalHandler(int) /builddir/build/BUILD/llvm-17.0.0.src/lib/Support/Unix/Signals.inc:403:3 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           9:  #3 0x000003fff30fe488 (linux-vdso64.so.1+0x488) 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          10:  #4 0x000003ffbcb0dbc0 (/lib64/libgcc_s.so.1+0xdbc0) 
check:5'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           .
           .
           .
>>>>>>

--

Ping on this, can we revert or fix this? I don't think running the aarch64 tests on a big-endian system is really supported. This is the same kind of crash that prompted by to write D145763.

Ping on this, can we revert or fix this? I don't think running the aarch64 tests on a big-endian system is really supported. This is the same kind of crash that prompted by to write D145763.

Sure, will try to fix it

Ping on this, can we revert or fix this? I don't think running the aarch64 tests on a big-endian system is really supported. This is the same kind of crash that prompted by to write D145763.

Sure, will try to fix it

Add a patch https://reviews.llvm.org/D148807