[llvm] [SPIR-V] Support extension toggling and enabling all (PR #85503)

Michal Paszkowski via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 09:18:26 PDT 2024


================
@@ -0,0 +1,7 @@
+; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=all %s -o - | FileCheck %s
+
+define i6 @getConstantI6() {
+  ret i6 2
+}
+
+; CHECK: OpExtension "SPV_INTEL_arbitrary_precision_integers"
----------------
michalpaszkowski wrote:

We do not emit `OpExtension` instructions for extensions which are not needed/used in the SPIR-V module. Here the function uses i6 type and so we emit `OpExtension "SPV_INTEL_arbitrary_precision_integers"`

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


More information about the llvm-commits mailing list