intel / intel/llvm

[libclc] remangler generates wrong function _Z22__spirv_GroupBroadcastiDhm when long width is 32

Open
#21,665 0 comments 0 reactions 1 assignee Claimed by @wenju-he View on GitHub
bug
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### Describe the bug

libspirv variants with long_width = 32 contain symbol _Z22__spirv_GroupBroadcastiDhm.
However,
_Z22__spirv_GroupBroadcastiDhm __spirv_GroupBroadcast(int, half, unsigned long)
should be remangled to
_Z22__spirv_GroupBroadcastiDF16_m __spirv_GroupBroadcast(int, _Float16, unsigned long)

_Z22__spirv_GroupBroadcastiDF16_Dv2_m and _Z22__spirv_GroupBroadcastiDF16_Dv3_m symbols are also missing in these long_width=32 bitcodes.

It seems the current logic incorrectly handles the case when both function has both half and long parameters that requires remangling.

This issue is exposed by https://github.com/intel/llvm/pull/21588

### To reproduce

### Environment

- OS: Windows, Linux
- Target device and vendor: nvptx, amdgpu
- DPC++ version: clang version 23.0.0git (https://github.com/intel/llvm 5ec9facc3fda38aeecfd6b0210403d492e51357a)

### Additional context

_No response_

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.