<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54407>54407</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang crashes with error message "Instruction does not dominate all uses" when building boringssl
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zeroomega
</td>
</tr>
</table>
<pre>
We are seeing clang front end crashes after patch 1eeb2bfe727323332800e8d390f2f8c63c953779 with messages:
```
FAILED: x64-shared/obj/third_party/boringssl/src/crypto/hrss/libcrypto.hrss.c.o
../../../recipe_cleanup/clangr3rqngfm/bin/clang -MD -MF x64-shared/obj/third_party/boringssl/src/crypto/hrss/libcrypto.hrss.c.o.d -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_THREAD_SA...
Instruction does not dominate all uses!
%shuffle430 = shufflevector <2 x i64> %348, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
%355 = xor <2 x i64> %shuffle430, %349, !dbg !1712
Instruction does not dominate all uses!
%shuffle429 = shufflevector <2 x i64> %346, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
%356 = xor <2 x i64> %shuffle429, %347, !dbg !1712
Instruction does not dominate all uses!
%shuffle428 = shufflevector <2 x i64> %344, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
%357 = xor <2 x i64> %shuffle428, %345, !dbg !1712
Instruction does not dominate all uses!
%shuffle427 = shufflevector <2 x i64> %342, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
%358 = xor <2 x i64> %shuffle427, %343, !dbg !1712
Instruction does not dominate all uses!
%450 = call <2 x i64> @llvm.fshl.v2i64(<2 x i64> %396, <2 x i64> %449, <2 x i64> <i64 63, i64 63>), !dbg !1804
%447 = shufflevector <2 x i64> %412, <2 x i64> %450, <2 x i32> <i32 0, i32 3>
in function HRSS_generate_key
fatal error: error in backend: Broken function found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: ../../../recipe_cleanup/clangr3rqngfm/bin/clang -MD -MF x64-shared/obj/third_party/boringssl/src/crypto/hrss/libcrypto.hrss.c.o.d -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_L...
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '../../third_party/boringssl/src/crypto/hrss/hrss.c'.
4. Running pass 'Module Verifier' on function '@HRSS_generate_key'
#0 0x00000000036830ad PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
```
We confirmed 1eeb2bfe727323332800e8d390f2f8c63c953779 is the culprit through bisecting. A minimal reproducer is attached:
[clang-reproducer.zip](https://github.com/llvm/llvm-project/files/8275744/clang-reproducer.zip)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdV0tv4zYQ_jX2hbAgkbIeBx8cPxADSdaIgy16MiiKkrgriSpJOcn--g4p20mzKeptk0sDS6KGI858804m8-fZbxxRxZHmXLQlYjWFe6FkaxBvc8QU1RXXiBaGK9RRwyoUcJ7hrOAxjgkmhODE93mSk9QvcJGwiLB0SuI4RY_CVKjhWtOS6xGZj_zlyD_dI__4c6_r-eZmtQQe9BSFE12BSvkIr2X2De6mEirfd1SZZ3jLpAJNta5hrRWDO1PPnZGwqJTW8KhFNpA8S_CYJwchngebLzfFmej4ntWctn1nz7HgFVF_tGXRWEmiPVHR5HYJ1_pz1PNyNFnubzZXi-12v9zs5lc3q_3XzW5ztbnZPPy-n9_dfXmYP2y-3O1eMa7uHN_D9f1qvtzvAJ434Ny02qieGSFblEvwXisNLBrRUgPermvUa3AIDgZ2hEZ4qqu-KGoeEh-NyBIdXw-cGamAssDoCYkoHJGV5SZhMsKLN_ROCi3b13SCHT9ZwAoFdscufCC-kkymUyfy6T1BL2q5c63kdFg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