<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/147162>147162</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[ARM] Expensive checks failures
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mstorsjo
</td>
</tr>
</table>
<pre>
Building libvpx for `armv7-linux-gnueabihf` triggers failures with expensive checks (`-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON`). These issues have been present since 2dcf0512599280ba68a5028f24ea96dfdb37b7b7 (since LLVM 18.1.0)
The issue can be reproduced with the following reduced testcase:
```c
char filter_mask_p3, filter_mask_p2;
int abs();
void filter4();
void vpx_lpf_vertical_4_c_s() {
char mask;
mask |= abs(filter_mask_p3 - filter_mask_p2);
filter4(mask, 2, 1, vpx_lpf_vertical_4_c_s, 1);
}
```
```console
$ clang -target armv7-linux-gnueabihf -c -O2 repro.c
*** Bad machine code: Call frame size on entry does not match value computed fro
m predecessor ***
- function: vpx_lpf_vertical_4_c_s
- basic block: %bb.1 entry (0x5b6a2651c518)
Call frame size on entry 0 does not match value computed from predecessor 4
*** Bad machine code: Call frame size on entry does not match value computed from predecessor ***
- function: vpx_lpf_vertical_4_c_s
- basic block: %bb.2 entry (0x5b6a2651c678)
Call frame size on entry 0 does not match value computed from predecessor 4
fatal error: error in backend: Found 2 machine code errors.
```
CC @jayfoad @davemgreen
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VUtv4zYQ_jX0ZWCDop4-6OD4gRbdR9FdLHoz-BhJ3FCkQVJK0l9f0HKwm22CngIQNDGcme_zx9EMD0H3FrEl5R0pDys-xcH5dgzR-fDdrYRTT-3dpI3StgejxXx5hM55IBXlfpzrtdF2elz3dkIu9NCRikL0uu_RB-i4NpPHAA86DoCPF7RBzwhyQHkfgLCGVHR9-PDh28fz8dPu7sPxfPz7z-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