================ @@ -0,0 +1,17 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +@PrivInternal = internal addrspace(10) global i32 456 +; CHECK-DAG: %[[#type:]] = OpTypeInt 32 0 +; CHECK-DAG: %[[#ptrty:]] = OpTypePointer Private %[[#type]] +; CHECK-DAG: %[[#value:]] = OpConstant %[[#type]] 456 +; CHECK-DAG: %[[#var:]] = OpVariable %[[#ptrty]] Private %[[#value]] + +define spir_kernel void @Foo() { + %p = addrspacecast ptr addrspace(10) @PrivInternal to ptr ---------------- Keenuts wrote:
Yes, I actually have 1 pattern that creates a bad pattern before inline. Trying to find a good way, but haven't so far. But that's for the FE so fine for this PR. https://github.com/llvm/llvm-project/pull/116636 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits