<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/77931>77931</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[AMDGPU] Backend crash from 'waitcnt overflow'
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:AMDGPU
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jhuber6
</td>
</tr>
</table>
<pre>
The following LLVM-IR crashes the AMDGPU backend due to a waitcnt overflow. This has just started happening in the past day or so. A reproducer can also be used here https://godbolt.org/z/d59Y7o3dz.
```llvm
target triple = "amdgcn-amd-amdhsa"
declare fastcc void @bar()
define fastcc i32 @foo() #0 {
fence acquire
call fastcc void @bar()
br label %1
1:
br label %1
}
attributes #0 = { "target-cpu"="gfx1030" }
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU01v2zgQ_TXUZWCDGlqWddDBhuDFAgmwWGQX6HFEjiSmtKiSVNLk1xeSnSbNoQX0ARBvHt-8eUMx2n5krkVxEkWT0ZwGH-rHYW457LPWm5f6YWDovHP-2Y493N39f7_5-1_QgeLAEdLAcLxv_vrnP2hJf-XRgJkZkgeCZ7JJjwn8E4fO-ectPAw2wkARHueYICYKiQ0MNE08Lux2XAknigkMvYAPEP0WjhB4Ct7MmgNoGoFc9NAyzHEp58AwpDRFoY4CzwLPvTetd2nrQy_w_CrwbIrqS-mVed0K2Qh5vH338vo493S5HiUKPSdIwU6OQagGBCJdTK_HDV3M8g6RBOJHHsPaUWDoKCat4clbA2InWwoCDwKrX7GdHX9CrcIF2Xl_RYJAJUGUpysYoONRM5D-NtvAb4eanPvDZQBtAEctOxBY5B8V5ItPvwGVzUc0pRRsOyeON22LJeVpseXq1UZP8-KHagRi333PpZICEd553lzOTK1MpSrKuM5LWch9uS9kNtStPOzLMu9Q6QPl5d5U1aEklEpRSyxNZmuUuJN5jrkqdrncapWjPLQKdxUqapXYSb6QddtlksvcMxvjzHVZVirP1hbjmnLEW06FOl6Du2gvmizUS-mmnfsodtLZmOI7WbLJrVtyKykaON3ivm4CdMFfQGD5OfMCy2wOrv6UT5uGud1qfxF4XrN3_W2m4B9ZJ4HnVX4UeF47-BEAAP__uOIZlQ">