<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/145821>145821</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[SPIR-V] Unimplemented implicit down-casts from bitcasted loads
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
winocm
</td>
</tr>
</table>
<pre>
This is a minimal test case that demonstrates the issue:
```llvm
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-vulkan1.3-unknown %s -o - | FileCheck %s
@bar = external addrspace(2) externally_initialized global i32
define void @foo() {
%load = load <4 x i8>, ptr addrspace(2) @bar, align 4
ret void
}
```
Loads (and probably stores) that are effectively the same size as the target variable require intermediate bitcasts.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkkk-PgzYQxT-NuYyIjPl_4LCbNFKlqq223V6rAQ9husamtkk2--krSLqqVMkSBsvvveH9MAS-WKJOlK-iPCW4xsn57sbWDXPSO33vfp84AAdAmNnyjAYihQgDBoI4YQRNs7MheowUIE4EHMJKIn8Rcl-VfCxjrvP2nr_C2_vPIn8BYwZIr-R5vKczDhNb4k0pQPqLhHSOnhdDIj-Fhf01va7mA212yNPVflh3syBUGSB1kIKoj3BmQ8eJho_9-9O9kD16EPkJ6DOSt2gAtfZhwYGEapRQ7feJuf_JliOj4S_ScDGuRwOcq4eWppEtwdWxBlHI0Tmhmu2-qF-FfNlcjUO9mz03xwI-gRuR_yDUEZbo_2_-SLgdo-GLhWKTAk9xN9qc69N_f-Mjy08OdQChGrQaFu967M0dQnSewqa6N4OegMaRhshXMve9nIAzQeAvAny0FdFfNjP0jL0h8PT3yp6AbSQ_k2aMBD3HAUMMh0R3uW7zFhPqsrqUTVs1VZFM3VA07SjrvO7lUNdyHNumbWSWkWqRmgwT7pRUpaxUJWVWqOIwVllVDlUhW1WrWuWikDQjm8MGysH5S7KD1GVF2agsMdiTCTuoSlm6PTFTauPWd9ultF8vQRTS8Bb1WyZyNDvhv_3641v6hyhP8G55XgzNZCNp2PY8cATtbjbdB4XRu_nfsUnvfYZk9aabYlzCRrc6C3W-cJzW_jC4WajzTvjjkS7e_UVDFOq85wxCnZ-DXDv1TwAAAP__EhUaWA">