<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95751>95751</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[SPIR-V] OpenCL CTS atomics atomic_xchg global uint64 test failure, load instruction type mismatch
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:SPIR-V
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
michalpaszkowski
</td>
</tr>
</table>
<pre>
```
./test_atomics atomic_xchg
Initializing random seed to 0.
Requesting Default device based on command line for platform index 0 and device index 0
Compute Device Name = Intel(R) Graphics [0xa780], Compute Device Vendor = Intel(R) Corporation, Compute Device Version = OpenCL 3.0 NEO , CL C Version = OpenCL C 1.2
Device latest conformance version passed: v2022-04-22-00
Supports single precision denormals: YES
sizeof( void*) = 8 (host)
sizeof( void*) = 8 (device)
atomic_xchg...
Testing atom_ functions...
global int32 ... (thread count 512, group size 512)
global uint32... (thread count 512, group size 512)
local int32 ... (thread count 512, group size 512)
local uint32 ... (thread count 512, group size 512)
global int64 ... (thread count 512, group size 512)
global uint64... (thread count 512, group size 512)
test_atomics: /home/michalpaszkowski/Driver/igc/build/IGC/llvm-deps/src/llvm/lib/IR/Instructions.cpp:1393: llvm::LoadInst::LoadInst(llvm::Type*, llvm::Value*, const llvm::Twine&, bool, llvm::Align, llvm::AtomicOrdering, llvm::SyncScope::ID, llvm::Instruction*): Assertion `Ty == cast<PointerType>(Ptr->getType())->getElementType()' failed.
Aborted (core dumped)
```
Most recent dumps (likely from the failing subtest):
```
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 2400 2024-06-17 01:20:38.642433841 -0700 OCL_asm4e4b6180ccbf0197_1_compiler_input_.spv
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 4405 2024-06-17 01:20:38.646433906 -0700 OCL_asm4e4b6180ccbf0197_2_spirv_backend_input_opaque.ll
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 14614 2024-06-17 01:20:38.646433906 -0700 OCL_asm4e4b6180ccbf0197_2_spirv_backend_alternative_input_typed.ll
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 2096 2024-06-17 01:20:38.654434036 -0700 OCL_asm4e4b6180ccbf0197_3_spirv_backend_output.spv
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 14850 2024-06-17 01:20:38.658434102 -0700 OCL_asm4e4b6180ccbf0197_4_bitcode_from_backend_output.ll
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 15020 2024-06-17 01:20:38.814436644 -0700 OCL_asm4e4b6180ccbf0197_beforeUnification.ll
```
Dumps:
[test_atomic_5815.zip](https://github.com/user-attachments/files/15864074/test_atomic_5815.zip)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVs9u2z4Sfhr6MrBBUZQsH3xw7fiHANmmSLIF9mRQ1MjmhiJVknKbPP2CkhonbtosjAICBXG-GX1Dzj_hvdobxCXJPpFsMxFdOFi3bJQ8CN0K__xov_tHNSlt9bQkOR0fuiF0NSNsG9CHnQi2UdLD8N79kIf9gIBro4ISWj0rswcnTGUb8IgVBAt0NoDu8FuHPkTEBmvR6QAVHpVEKIXHCqwBaZtGmAq0Mgi1ddBqEWrrGlCmwh9AIUpHrXFrML62TdsFhM0g-ywaBJJu4NoE1IQVd4Qt4B8n2kN0gGSf6A8xLyjJNoSt4Uz7K5rKul_119a11omgrHlXy3llTa9226JZ30A6o_D56hZ69A2s38OsIZkxGLwYLWkRjxukNdF3YSTCcVRshfdYkXQFR0YZm1I-jet4Cvdd21oXPHhl9hqhdShVr1ehiaa0j6r_ubof8F49o60JK-BoVUXYKnoZuRUAhBUH6wNhi_8LO1zKC_pViMxmYwAAADyMERDlO6g7I-Np-hcMoYu9tqXQoExIGfSCBWFFODgUFUjbmQBZwuKR7p3tWojEhp3FuY2uN3KhDW3lC41LeQw2ur_hizIh53_hPHJ-iY3X-R9DiLDtwTZI2Pa8hBC23Th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