<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/149616>149616</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[LLVM][LoongArch] `X86SnippetRepetitorTest.Loop` test fails
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
wegank
</td>
</tr>
</table>
<pre>
On a Loongson 3C6000 machine with a NixOS installation, `X86SnippetRepetitorTest.Loop` test consistently fails when compiling LLVM 19/20. The failure is currently mitigated downstream by https://github.com/loongson-community/nixpkgs/commit/c860c2b769ea3415d073ca2830585f2ee4d39413 and the superseding https://github.com/NixOS/nixpkgs/pull/426088.
Attached is the relevant error log.
```shell
FAIL: LLVM-Unit :: tools/llvm-exegesis/./LLVMExegesisTests/21/35 (57237 of 58466)
******************** TEST 'LLVM-Unit :: tools/llvm-exegesis/./LLVMExegesisTests/21/35' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/build/llvm-src-20.1.6/llvm/build/unittests/tools/llvm-exegesis/./LLVMExegesisTests-LLVM-Unit-18270-21-35.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=35 GTEST_SHARD_INDEX=21 /build/llvm-src-20.1.6/llvm/build/unittests/tools/llvm-exegesis/./LLVMExegesisTests
--
Script:
--
/build/llvm-src-20.1.6/llvm/build/unittests/tools/llvm-exegesis/./LLVMExegesisTests --gtest_filter=X86SnippetRepetitorTest.Loop
--
/build/llvm-src-20.1.6/llvm/unittests/tools/llvm-exegesis/X86/SnippetRepetitorTest.cpp:104: Failure
Value of: LoopBlock.liveins()
Expected: has 2 elements and there exists some permutation of elements such that:
- element #0 is an object whose given field is equal to 22, and
- element #1 is an object whose given field is equal to 0
Actual: 16-byte object <50-86 E4-23 01-00 00-00 70-86 E4-23 01-00 00-00>, where the following matchers don't match any elements:
matcher #1: is an object whose given field is equal to 0
and where the following elements don't match any matchers:
element #0: 16-byte object <77-00 00-00 01-00 00-00 FF-FF FF-FF FF-FF FF-FF>
/build/llvm-src-20.1.6/llvm/unittests/tools/llvm-exegesis/X86/SnippetRepetitorTest.cpp:104
Value of: LoopBlock.liveins()
Expected: has 2 elements and there exists some permutation of elements such that:
- element #0 is an object whose given field is equal to 22, and
- element #1 is an object whose given field is equal to 0
Actual: 16-byte object <50-86 E4-23 01-00 00-00 70-86 E4-23 01-00 00-00>, where the following matchers don't match any elements:
matcher #1: is an object whose given field is equal to 0
and where the following elements don't match any matchers:
element #0: 16-byte object <77-00 00-00 01-00 00-00 FF-FF FF-FF FF-FF FF-FF>
********************
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsVs1u2zgQfhr6MpBBkfrzwQe1srYFvM2idoreAkoaS2wpUitScfL2C8p2kkWDoNkucipgCPJohvPNNz8cYa1sNeKaxO9IXCzE5Dozro_YCv19UZnmfn2lQcDWGN1ao4G_Tyil0Iu6kxrhKF0HAj7Ju6sdSG2dUEo4aTRh74Ek9GuW7LQcBnSfcUAnnRn3aN1ya8xAEgoOrYPaaCutQ-3UPRyEVBaOHWqoTT9IJXUL2-2XPyFcEVYyuoR9h7PaNCJIC_U0jifbXjrZCocNNOaorRtR9FDdQ-fcYAnPCSsJK1vpuqla1qYnrFTnwILa9P2kpbsnrNTybvjeWsJKL5XOv2QJrVmVJisUPArjhqa8FizjNM7iA0OMGr6KQg5CN-A6BDsNOFpsPPwX_M_M_cvlMClFWBmxhGbZktCc0Dx3TtQdNj5cf_iICm-FdoDjaEZQpj0rkoSefrZDpQjNy_zjlvB8ZjC41tKBx8FzcMYo706p2z7AO2zRSv9_SVjplTdnkU-Xl7OQsJLHQFgWp4ynYA4QZ1GSELbyjtl__8F-s9sDYen_BZKwFHzgmwJ-BReh-a4e5eAIy2wnxsaHyr04CAjN__Cwb66u939d7wkvvlmjTzmuJqmaC2o71gGjy3CZnCVPFHy9uTP0V4UaPDAVhBlLacDCg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