Issue 182899
Summary [llvm][SPIRV] External global variables are incorrectly optimized away
Labels new issue
Assignees sarnex
Reporter adurang
    For a simple code like:
```
#pragma omp begin declare target
int x = 0;
#pragma omp end declare target
``` 
The variable is optimized away by the SPIRV backend and doesn't appear in the generated SPIRV:
```
        OpCapability Kernel
        OpCapability Addresses
        OpCapability Linkage
        %1 = OpExtInstImport "OpenCL.std"
        OpMemoryModel Physical64 OpenCL
        OpSource OpenCL_CPP 100000
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to