[llvm] [SPIRV] Do not emit @llvm.compiler.used (PR #162678)

Marcos Maronas via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 07:10:42 PDT 2025


Juan Manuel Martinez =?utf-8?q?Caamaño?= <juamarti at amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juamarti at amd.com>,
Juan Manuel Martinez =?utf-8?q?Caamaño?= <juamarti at amd.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/162678 at github.com>


================
@@ -0,0 +1,18 @@
+; RUN: llc -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
+
+; Verify that llvm.used is not lowered
+; Currently we do lower it.
+; CHECK: OpName %[[UNUSED:[0-9]+]] "unused"
+; CHECK-NOT: OpName %[[LLVM_USED_NAME:[0-9]+]] "llvm.used"
+
+; Check that the type of llvm.used is not emited too
----------------
maarquitos14 wrote:

```suggestion
; Check that the type of llvm.used is not emited too.
```

https://github.com/llvm/llvm-project/pull/162678


More information about the llvm-commits mailing list