Skip to content

Support DIExpression DebugInfo #3752

Description

@spencer-lunarg

I have this simple CL kernel

__kernel void addVectors(__global const float* a,
                         __global const float* b,
                         __global float* c)
{
    int id = get_global_id(0);

    float temp = a[id] + b[id];
    c[id] = temp;
}

And ran

$ clang-22 -c -cl-std=CL3.0 -target spir64 -emit-llvm -Xclang -finclude-default-header -g -O3 simple.cl

$ build/tools/llvm-spirv/llvm-spirv --spirv-ext=+all --spirv-max-version=1.3 simple.bc -o simple.spv

and getting

LLVM ERROR: unsupported opcode found in DIExpression
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.	Program arguments: build/tools/llvm-spirv/llvm-spirv --spirv-ext=+all --spirv-max-version=1.3 simple.bc -o simple.spv
1.	Running pass "SPIRV::LLVMToSPIRVPass" on module "simple.bc"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions