[all-commits] [llvm/llvm-project] 27c9b5: [SPIRV] Add more id and range builtIns (#143909)
Victor Lomuller via All-commits
all-commits at lists.llvm.org
Wed Jul 9 05:52:28 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 27c9b55659c99fad4583fb6fa29dd079ea8b9582
https://github.com/llvm/llvm-project/commit/27c9b55659c99fad4583fb6fa29dd079ea8b9582
Author: Victor Lomuller <victor at codeplay.com>
Date: 2025-07-09 (Wed, 09 Jul 2025)
Changed paths:
M clang/include/clang/Basic/BuiltinsSPIRVCL.td
M clang/include/clang/Basic/BuiltinsSPIRVCommon.td
M clang/lib/CodeGen/CGHLSLRuntime.cpp
M clang/lib/CodeGen/TargetBuiltins/SPIR.cpp
M clang/lib/Headers/__clang_spirv_builtins.h
M clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl
M clang/test/CodeGenHLSL/semantics/SV_GroupID.hlsl
M clang/test/CodeGenHLSL/semantics/SV_GroupThreadID.hlsl
A clang/test/CodeGenSPIRV/Builtins/ids_and_ranges.c
A clang/test/Headers/spirv_ids.cpp
A clang/test/SemaSPIRV/BuiltIns/ids_and_ranges.c
M llvm/include/llvm/IR/IntrinsicsSPIRV.td
M llvm/lib/IR/Intrinsics.cpp
M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
A llvm/test/CodeGen/SPIRV/builtin_intrinsics_32.ll
A llvm/test/CodeGen/SPIRV/builtin_intrinsics_64.ll
M llvm/test/CodeGen/SPIRV/hlsl-intrinsics/SV_DispatchThreadID.ll
M llvm/test/CodeGen/SPIRV/hlsl-intrinsics/SV_GroupID.ll
M llvm/test/CodeGen/SPIRV/hlsl-intrinsics/SV_GroupThreadID.ll
Log Message:
-----------
[SPIRV] Add more id and range builtIns (#143909)
The patch adds intrinsics and lowering logic for GlobalSize,
GlobalOffset, SubgroupMaxSize, NumWorkgroups, WorkgroupSize,
WorkgroupId, LocalInvocationId, GlobalInvocationId, SubgroupSize,
NumSubgroups, SubgroupId and SubgroupLocalInvocationId SPIR-V builtins.
The patch also extend spv_thread_id, spv_group_id and
spv_thread_id_in_group to return anyint rather than i32. This allows the
intrinsics to support the opencl environment.
For each of the intrinsics, new clang builtins were added as well as a
binding for the SPIR-V "friendly" format. The original format doesn't
define such binding (uses global variables) but it is not possible to
express the Input SC which is normally required by the environement
specs, and using builtin functions is the most usual approach for other
backend and programming models.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list