allow casting nullptr to any addrspace (#3305)
This allows translation of code like the following, which previously
errored:
```llvm
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
target triple = "spir64-unknown-unknown"
define spir_kernel void @bar(ptr addrspace(1) %arg) {
pass26:
%expr = icmp eq ptr addrspace(1) addrspacecast (ptr null to ptr addrspace(1)), %arg
ret void
}
```
It is important this works because the addrspacecast is needed for
addrspaces where NULL doesn't correspond to a zero value. We previously
ran into correctness errors on some platforms without this cast, ref
ROCm/llvm-project#281
Original commit:
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/a39dac28df8106d