[all-commits] [llvm/llvm-project] 3a0842: [SPIRV] Do not emit @llvm.used (#179498)
Nick Sarnie via All-commits
all-commits at lists.llvm.org
Thu Feb 5 08:28:45 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3a084241248efd7d5259183cffae1d5b7057a54c
https://github.com/llvm/llvm-project/commit/3a084241248efd7d5259183cffae1d5b7057a54c
Author: Nick Sarnie <nick.sarnie at intel.com>
Date: 2026-02-05 (Thu, 05 Feb 2026)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
A llvm/test/CodeGen/SPIRV/llvm-used.ll
Log Message:
-----------
[SPIRV] Do not emit @llvm.used (#179498)
Extending the work from https://github.com/llvm/llvm-project/pull/162678
which skips `llvm.compiler.used`, we also need to skip processing of
`llvm.used`.
The OpenMP frontend puts an `addrspace(2)` variable in `llvm_used`, but
the `llvm.used` array type uses the generic AS `addrspace(4)` so there's
a `addrspacecast` from `2` to `4` inside the initalizer for `llvm.used`
which is illegal and errors in the backend.
There is
[discussion](https://github.com/llvm/llvm-project/pull/162678#issuecomment-3396735124)
in the above linked PR that the handing should be the same for
`llvm.used` and `llvm.compiler.used`, but `llvm.used` was not added to
minimize the scope of the PR.
This is required to use the OpenMP Device RTL with SPIR-V.
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
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