intel / intel/llvm

[SYCL] Line number info looks random and wrong

Open
#11,573 0 comments 0 reactions 0 assignees View on GitHub
bug confirmed pdtracker
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

**Describe the bug**
This is found in https://github.com/intel/llvm/pull/11569
when updating clang/test/CodeGenSYCL/function-attrs.cpp

The line number generated are different in different env.
eg: I get follow values in one run

> !3 = !{i32 1302}
> !4 = !{}
> !5 = !{i32 747}
> !6 = !{i32 1088}
>

but @zahiraam got following in his run:

// !3 = !{i32 1180}
// !4 = !{}
// !5 = !{i32 628}
// !6 = !{i32 966}

**To Reproduce**

$LLVM_ROOT/llvm/build/bin/clang -cc1 -internal-isystem $LLVM_ROOT/llvm/build/lib/clang/18/include -nostdsysteminc -fsycl-is-device -emit-llvm -disable-llvm-passes -triple spir64 -fexceptions -emit-llvm -fno-ident $LLVM_ROOTllvm/clang/test/CodeGenSYCL/function-attrs.cpp

Check the line numbers -- why we get 1302/747/1088 ? Are these line no valid?

**Environment (please complete the following information):**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.