<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/92941>92941</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[HLSL] Boolean conversion overload scoring
</td>
</tr>
<tr>
<th>Labels</th>
<td>
HLSL
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
llvm-beanz
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
llvm-beanz
</td>
</tr>
</table>
<pre>
We have two options to consider here:
1) Observe C rules
-or-
2) Adopt new HLSL rules as proposed in https://github.com/microsoft/hlsl-specs/pull/244
### Option 1: C Rules
If we choose Option 1, this task is to add `bool` overloads for intrinsic where it makes sense to call them with bool values, and properly codegen those as if `bool` was converted to `int.
### Option 2: New HLSL Rules
The spec PR posted above suggests treating `bool` effectively as lower than the lowest rank of integer type. A slight variation is that we could treat it as promotable to `int`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k0GL4zgQhX-NfCkSZDl24oMP6W7CLjTbS-_CnmW7bGlbURmV7JD59YOchPRlBgIhkfzqvc_1NLMdPWIjyhehlHPLedOi9j-EUqJ8y_QcDYXm-X_WUn9t_kMwekGIFwKaoiXPEAk68mx7DGAwoCiOQh5zoWr4aBnDgvAKYXbIQh43FDZCHlU6PfY0RfB4gT_e_3m_XQHNMAWaiLEH68HEOHFSVCehTqONZm63HZ2FOp1tF4hpiEKdjGO34Qk7Fuo0zc4JdVK7nZDJilDF7QMfq2XIRXGEV_i8e_pzgAtCZ4gYn1fUK0RjGaLmL7BrTN33ICrZEjlRSaAFgyPdMwwUwPoYrGfbwSVRABvhrL-QgdEzrpS0cxANnuFio4EkA4t2M3Iapn2_JsfgrtBRjyN6iCZ50gx2-D75ojkxXzBE7JO0qKT1cfuLvCrl_evB-RH7X4OQkMHfnzARJyXd0oLA8zgiR4YYUEfrx--jcRiwi3ZBd02-HF0wQDQ6ecX1J0cI2n8BDYkJjun8OuEWjsDOjibCooPVq7PE1ei48qfZ9beRid1tD84UdevwGVFUMqXM-qbo66LWGTb5Pq-KvMiLQ2aafp-XeTmUUrWHqlb7sqy6vdzLdt-VpVZdZhsl1U6WKs_3xaE8bLHUXSXrVrflQaq6FTuJZ23dNu3-lsKYWeYZm1rVuzxzukXH99YknPe-PKoyjyx20lmO_BSINrq1aesD5Ru8EDnU_v4OOZF4LBNwR8H6MZuDa36z_Un8_rWZAv2PXerBajV1YHX7MwAA__8zB0bL">