[PATCH] D80028: [AArch64] Support expression results as immediate values in mov

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 02:09:34 PDT 2020


kristof.beyls added inline comments.


================
Comment at: llvm/test/MC/AArch64/mov-expr-as-immediate.s:1
+// RUN: llvm-mc -triple aarch64-none-linux-gnu %s -filetype=obj -o %t | llvm-objdump --triple aarch64-none-linux-gnu -Dr %t | FileCheck %s
+
----------------
It seems that this test line has a race condition, and is causing bots to fail non-deterministically.
For example:
 http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/30108/steps/test-check-all/logs/stdio
 http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/6224/steps/check/logs/stdio

The error message I get on a local test run (which sometimes passes, sometimes fails) is per below.
I think this indicates that instead of using a pipe (|), there should be a semi-colon (or something similar if lit does not support semi-colons) between the run of llvm-mc and the run of llvm-objdump.
It seems that in some invocations, the pipe results in llvm-objdump getting run before llvm-mc is finished writing to temporary file %t.

llvm/test/MC/AArch64/mov-expression-as-immediate.s seems to have the same issue.

If the above seems correct, could you fix this?





```
kribey01 at hw-a20-17:~/dev/llvm.org/build2$ ./bin/llvm-lit -sv ~/dev/llvm.org/llvm-project/llvm/test/MC/AArch64/mov-expression-as-immediate.s
FAIL: LLVM :: MC/AArch64/mov-expression-as-immediate.s (1 of 1)
******************** TEST 'LLVM :: MC/AArch64/mov-expression-as-immediate.s' FAILED ********************
Script:
--
: 'RUN: at line 1';   /home/kribey01/dev/llvm.org/build2/bin/llvm-mc -triple aarch64-none-linux-gnu /home/kribey01/dev/llvm.org/llvm-project/llvm/test/MC/AArch64/mov-expression-as-immediate.s -filetype=obj -o /home/kribey01/dev/llvm.org/build2/test/MC/AArch64/Output/mov-expression-as-immediate.s.tmp | /home/kribey01/dev/llvm.org/build2/bin/llvm-objdump -d /home/kribey01/dev/llvm.org/build2/test/MC/AArch64/Output/mov-expression-as-immediate.s.tmp | /home/kribey01/dev/llvm.org/build2/bin/FileCheck /home/kribey01/dev/llvm.org/llvm-project/llvm/test/MC/AArch64/mov-expression-as-immediate.s
--
Exit Code: 2

Command Output (stderr):
--
/home/kribey01/dev/llvm.org/build2/bin/llvm-objdump: error: '/home/kribey01/dev/llvm.org/build2/test/MC/AArch64/Output/mov-expression-as-immediate.s.tmp': The file was not recognized as a valid object file
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/kribey01/dev/llvm.org/build2/bin/FileCheck /home/kribey01/dev/llvm.org/llvm-project/llvm/test/MC/AArch64/mov-expression-as-immediate.s

--

********************
********************
Failed Tests (1):
  LLVM :: MC/AArch64/mov-expression-as-immediate.s
```





Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80028/new/

https://reviews.llvm.org/D80028





More information about the llvm-commits mailing list