<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/95760>95760</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [SPIR-V] OpenCL CTS basic progvar_prog_scope_init, type mismatch between initializer and global variable
        </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_basic progvar_prog_scope_init
 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)
progvar_prog_scope_init...
 bool OK
  uchar OK
test_basic: /home/michalpaszkowski/Driver/igc/build/IGC/llvm-deps/src/llvm/lib/IR/Globals.cpp:366: llvm::GlobalVariable::GlobalVariable(llvm::Module&, llvm::Type*, bool, llvm::GlobalValue::LinkageTypes, llvm::Constant*, const llvm::Twine&, llvm::GlobalVariable*, llvm::GlobalValue::ThreadLocalMode, unsigned int, bool): Assertion `InitVal->getType() == Ty && "Initializer should be the same type as the GlobalVariable!"' failed.
Aborted (core dumped)
```

Most recent dump files:
```
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski   686 2024-06-17 02:28:00.159881612 -0700 OCL_asm525350ae9d25a2a8.cl
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 3064 2024-06-17 02:28:00.159881612 -0700 OCL_asm525350ae9d25a2a8_1_compiler_input_.spv
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski  4605 2024-06-17 02:28:00.163881736 -0700 OCL_asm525350ae9d25a2a8_2_spirv_backend_input_opaque.ll
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski 15661 2024-06-17 02:28:00.163881736 -0700 OCL_asm525350ae9d25a2a8_2_spirv_backend_alternative_input_typed.ll
-rw-rw-r-- 1 michalpaszkowski michalpaszkowski  2568 2024-06-17 02:28:00.175882102 -0700 OCL_asm525350ae9d25a2a8_3_spirv_backend_output.spv
```

Dumps:
[test_basi_6472.zip](https://github.com/user-attachments/files/15864761/test_basi_6472.zip)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVk1v2zgQ_TX0ZWCBoixZOvjg2nURbNoskiDAngxKHFvcUCRLUk6TX7-gpHw0TdtFdgFBgsg3M2-Gw0dy7-VRI65I_oHk2xnvQ2vcqpNNy5Xl_uHW3PlbOauNuF-Rgk4P3RK6TgjbBfRhX3MvG7DOHE_c7eN37xtjcS-1DCMWzrQMkiv5IPURHNfCdOARBQQDNBlBl_i1Rx8iYosH3qsAAk-yQai5RwFGQ2O6jmsBSmqEg3FgFQ8H4zqQWuA3oBBnJ6tpaHS-MZ3tA8J2nPvCOwSSbeFMB1SElZeEVfDJcdvKxgPJP9BvfFlSkm8J28Ar6xvUwrgf7TfGWeN4kEa_aeW8NHowu7CoN-eQJRS-fLyAAX0Om7cwG0gTBmMWkyfFY-GhMTrmznWDcJoMLfceBcnWcGKUsTldzON7qsJVb61xwYOX-qgQrMNGDnYCdXSlfDT96-PViPfyAc2BsBJORgrC1jHLyK0EIKxsjQ-EVf8KOy7KE_on7ZIkUzNAbYyCiz-mP-iblrun_-e-i3QJ27WmQ8J2rxuXsN3WyRM6wnby2BC2q3upBGG7s08bwnZKnbq5QOsJ23nXTCPxI-sIuiRs90mZmiufNNaSbJ0VRQw5wLI1ydbj9A13ktcK3xxj5TP8sxF9HCrikj8PX99bHEq2GRL_fvLRneon_-dS3_IjRiP_PXRjtA9ch8lXE39fhrmT-sfgr-mufxP-unXIxblpuPpsBEZ0rwchESBj7MckqliqtffowtDUBY06cMPVnGQfjxjGrMupU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