<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/78727>78727</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang crash compiling ffmpeg on AArch64 Linux with EXPENSIVE_CHECKS enabled
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DavidSpickett
</td>
</tr>
</table>
<pre>
To reproduce build clang from `main` (`535b197b8e96b816998ad4b4ee45e011fa05fba9` at this time) with `EXPENSIVE_CHECKS` enabled, then build ffmpeg:
```
$ git clone https://github.com/ffmpeg/ffmpeg
$ cd ffmpeg
$ git checkout 65739691b90012c9d93b2e5e0e89a55d8de9eb7b
$ cd ..
$ mkdir ffmpeg-build
$ cd ffmpeg-build
$ ../ffmpeg/configure --cc=<path/to/built/clang>
$ make -j$(nproc) fate-checkasm
```
```
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 18.0.0git (https://github.com/llvm/llvm-project.git 535b197b8e96b816998ad4b4ee45e011fa05fba9)
Target: aarch64-unknown-linux-gnu
```
Or use the single file reproducer that clang made:
```
$ ./vf_chromakey-76c8c6.sh
clang-18: /home/david.spickett/llvm-project/llvm/lib/CodeGen/MachineCombiner.cpp:562: void (anonymous namespace)::MachineCombiner::verifyPatternOrder(llvm::MachineBasicBlock *, llvm::MachineInstr &, SmallVector<llvm::MachineCombinerPattern, 16> &): Assertion `CurrentLatencyDiff <= PrevLatencyDiff && "Current pattern is better than previous pattern."' failed.
```
[vf_chromakey-76c8c6.zip](https://github.com/llvm/llvm-project/files/13991028/vf_chromakey-76c8c6.zip)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVVtv2zYU_jX0y4EEibrywQ-OL1uxbi2QothbwcuRxVoiBZJym_36gbaSOmkWrEAQUyTP7fu-c8i910eDuCbVHal2Kz6H3rr1jp-1up-0PGEIK2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