<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54214>54214</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
OpenMP custom state machine optimization fails with a single thread
</td>
</tr>
<tr>
<th>Labels</th>
<td>
openmp
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
jdoerfert
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jhuber6
</td>
</tr>
</table>
<pre>
The custom state machine had a check for surplus threads that filtered the main thread if the kernel was executed by a single warp only. This prevented us from executing the region if only a single thread was present. Normally a parallel region with one thread had its state machine removed, but this occurs when there is no parallelism in an external call.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtUsmOnDAQ_Rq4lILAQBoOHLIotyyH-QEvBXaPsZGX7nS-PgVDZqRRJCS7XK_eUkJ49ZieNILMMfkVYuIJYeVSG4eguQIOUqN8htkHiDlsNkdIOiBX-8kTzMYmDKio2ieNO9tg5uPpGYNDC3ceAX-jzImg4kG80bjFIjXCBt7ZRwVP2kTYAt7Q7ShSmgOZehkj9MEXcDHe7ez70BvPqbrrEEUkigp--LBye6A2HuhGRs75u0maGF7n9qwmxXcbCLj6G6qCfQGRE2HJoJcyhwh3jXtUig706Pyrgokr0Ba4I-O0GcctSGpUpZpaNbYjL5NJFqefG7rvv_6_eb8ls5o_PO1WZ25sfDH8Lm2Zg510Slss2k8F-0bfQrAsKulXKqy9_Ts-bMFfUSYqTYwZI136jjVdqadONXwcmRJyaEY5Yj_0QiolmkvL-lGK0nKBNk5F_7lgzJPvdaNL0X8tzcRqxuq27pqhqetLdRn42F74iEPHmRzmoquR_gpb7SYqH5YyTIcfkZdITVpXim9NHqNZHOKpdVUew4whnXI8J-3DdKWIGD6WR5LpiPEXnAb5WA">