[llvm] [SPIR-V] Simplify addrspacecast for null in composite constant preprocessing (PR #192030)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 04:55:52 PDT 2026


https://github.com/MrSidims commented:

The fix is LGTM, but I wonder if SPIR-V backend (today) can handle a sample like this:
```
define spir_kernel void @bar(ptr addrspace(1) %arg) {
entry:
  %expr = icmp eq ptr addrspace(1) addrspacecast (ptr null to ptr addrspace(1)), %arg
  ret void
}
```
If no - the fix in this PR should be generalized.

https://github.com/llvm/llvm-project/pull/192030


More information about the llvm-commits mailing list