<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66107>66107</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[SPIRV] All SPIR-V pointer types are i8* instead of the proper type
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue,
backend:SPIR-V
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
Keenuts
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Keenuts
</td>
</tr>
</table>
<pre>
This is a known issue for the SPIR-V backend, creating this to track the status.
Before opaque pointers, the LLVM types were lowered directly to their SPIR-V equivalent.
Now that we have opaque pointers, we need to retrieve the SPIR-V type from the typed operations like load/store.
The current backend can retrieve some types, but for pointers, it falls back on `i8*`. This is probably because OpenCL can do pointer-casting.
For graphical SPIR-V, we are not allowed to do pointer casts, so we need to figure out the correct pointer type. LLVM-SPIRV translator already has such logic (type scavenger), so we'd need to reproduce this logic in this backend.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU02P4ygQ_TX4Uopl49hJDj5kuhVptb0f2h31HUPZZpuAB4pE-fcriDOdluZiC0S9V_VePRGCnixiz9pvjPPfEW2kwDhn7WshIs3O9-tlMTh167_POoAOIODDuqsFHUJEGJ0HmhH-_fu3fzbvMAj5gVYx_gLSoyBtJ6BUSA7IC_mRHwcSFEPJqldWHe_fbzg6j-AW8SMiLE5bQh8STip4e3v_A-i2YIAregTj0k-B0h4lmVuGn1H7Rx_4I-qLMGhpZfnTXYFmQXBFmMXll0xXBIuoEphH8hov-Dxb4ofRu3O-TCcFbkEvSDsbwOiP1JhQjJ8COY8r8_cZQUbv0dJDHpDCflIEd77D5SaGSFnU58Y0wSiMCbkenAXWVXrP-JF1VQkPYxbvBjGYGwwoRQwIfy1oX94ymXIPwI0UIdnyRf2T8zB5scxaCrPOuyoiPIJ1BMIk0bM4n2CQwHKLwT3LN-opJjcjZa2k88mnn1Vp2DKbuklc72k1bDCCnAdhPAp1g1kECFHOYNykJTC-z_oHKS5oJ_SMH37yMr5TT9Yt3qko8b5493Jt76fVgLJQfaMOzUEU2NfdYds2XdfwYu6HetfsVd203X4r22aUTb2r27FrtnXX7Bte6J5XvKkONa-7ZlfzkiuUsttxPu7aTnUD21Z4FtqUxlzOpfNTkZPSd11d7QojBjRhDZ3F6z1GKXb8hXH-yE9zfJiQ8-j7BLYZ4hTYtjI6UPiEJ00mxzhrydpXOJqHiV8kD9nMvDigbSAUCtyYHVp82uT8qoje9DPRElhzZPzE-GnSNMehlO7M-Cnxrr_N4t1_KInxUx4jMH7KY_4fAAD__3P5dVo">