Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package spirv-llvm-translator for 
openSUSE:Factory checked in at 2025-03-06 14:48:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/spirv-llvm-translator (Old)
 and      /work/SRC/openSUSE:Factory/.spirv-llvm-translator.new.19136 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "spirv-llvm-translator"

Thu Mar  6 14:48:14 2025 rev:16 rq:1250254 version:19.1.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/spirv-llvm-translator/spirv-llvm-translator.changes  
    2025-02-27 14:53:01.337705038 +0100
+++ 
/work/SRC/openSUSE:Factory/.spirv-llvm-translator.new.19136/spirv-llvm-translator.changes
   2025-03-06 14:48:40.149289745 +0100
@@ -1,0 +2,12 @@
+Mon Mar  3 22:20:30 UTC 2025 - Aaron Puchert <aaronpuch...@alice-dsl.net>
+
+- Update to version 19.1.5.
+  * Fix DebugLinePriority.spt SPIR-V validation errors.
+  * Emit alloca for all OpVariables with Function storage.
+  * Align translation of OpCooperativeMatrixLengthKHR to match the
+    spec.
+  * Check if OpCooperativeMatrixLengthKHR operand is a type.
+  * Fix incorrect translation of calls to a builtin that returns a
+    structure.
+
+-------------------------------------------------------------------

Old:
----
  SPIRV-LLVM-Translator-19.1.4.tar.gz

New:
----
  SPIRV-LLVM-Translator-19.1.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ spirv-llvm-translator.spec ++++++
--- /var/tmp/diff_new_pack.BaddyB/_old  2025-03-06 14:48:40.845318934 +0100
+++ /var/tmp/diff_new_pack.BaddyB/_new  2025-03-06 14:48:40.849319102 +0100
@@ -19,7 +19,7 @@
 
 %define sover   19
 Name:           spirv-llvm-translator
-Version:        19.1.4
+Version:        19.1.5
 Release:        0
 Summary:        LLVM/SPIR-V Bi-Directional Translator library
 License:        BSD-3-Clause

++++++ SPIRV-LLVM-Translator-19.1.4.tar.gz -> 
SPIRV-LLVM-Translator-19.1.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/SPIRVReader.cpp 
new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/SPIRVReader.cpp
--- old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/SPIRVReader.cpp  2025-01-13 
11:23:23.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/SPIRVReader.cpp  2025-02-26 
13:41:00.000000000 +0100
@@ -1645,9 +1645,18 @@
       return transValue(Init, F, BB);
     }
 
-    if (BS == StorageClassFunction && !Init) {
-      assert(BB && "Invalid BB");
-      return mapValue(BV, new AllocaInst(Ty, 0, BV->getName(), BB));
+    if (BS == StorageClassFunction) {
+      // A Function storage class variable needs storage for each dynamic
+      // execution instance, so emit an alloca instead of a global.
+      assert(BB && "OpVariable with Function storage class requires BB");
+      IRBuilder<> Builder(BB);
+      AllocaInst *AI = Builder.CreateAlloca(Ty, 0, BV->getName());
+      if (Init) {
+        auto *Src = transValue(Init, F, BB);
+        const bool IsVolatile = BVar->hasDecorate(DecorationVolatile);
+        Builder.CreateStore(Src, AI, IsVolatile);
+      }
+      return mapValue(BV, AI);
     }
 
     SPIRAddressSpace AddrSpace;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/SPIRVUtil.cpp 
new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/SPIRVUtil.cpp
--- old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/SPIRVUtil.cpp    2025-01-13 
11:23:23.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/SPIRVUtil.cpp    2025-02-26 
13:41:00.000000000 +0100
@@ -2227,8 +2227,9 @@
       Builder.SetInsertPoint(CI);
       SmallVector<User *> Users(CI->users());
       Value *A = nullptr;
+      StoreInst *SI = nullptr;
       for (auto *U : Users) {
-        if (auto *SI = dyn_cast<StoreInst>(U)) {
+        if ((SI = dyn_cast<StoreInst>(U)) != nullptr) {
           A = SI->getPointerOperand();
           InstToRemove.push_back(SI);
           break;
@@ -2248,12 +2249,18 @@
       NewF->setCallingConv(F->getCallingConv());
       auto Args = getArguments(CI);
       Args.insert(Args.begin(), A);
-      CallInst *NewCI = Builder.CreateCall(NewF, Args, CI->getName());
+      CallInst *NewCI = Builder.CreateCall(
+          NewF, Args, NewF->getReturnType()->isVoidTy() ? "" : CI->getName());
       NewCI->addParamAttr(0, SretAttr);
       NewCI->setCallingConv(CI->getCallingConv());
-      SmallVector<User *> CIUsers(CI->users());
-      for (auto *CIUser : CIUsers) {
-        CIUser->replaceUsesOfWith(CI, A);
+      SmallVector<User *, 32> UsersToReplace;
+      for (auto *U : Users)
+        if (U != SI)
+          UsersToReplace.push_back(U);
+      if (UsersToReplace.size() > 0) {
+        auto *LI = Builder.CreateLoad(F->getReturnType(), A);
+        for (auto *U : UsersToReplace)
+          U->replaceUsesOfWith(CI, LI);
       }
       InstToRemove.push_back(CI);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/SPIRVWriter.cpp 
new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/SPIRVWriter.cpp
--- old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/SPIRVWriter.cpp  2025-01-13 
11:23:23.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/SPIRVWriter.cpp  2025-02-26 
13:41:00.000000000 +0100
@@ -6622,6 +6622,10 @@
                                       transValue(CI->getArgOperand(2), BB), 
BB);
     return BM->addStoreInst(transValue(CI->getArgOperand(0), BB), V, {}, BB);
   }
+  case OpCooperativeMatrixLengthKHR: {
+    return BM->addCooperativeMatrixLengthKHRInst(
+        transScavengedType(CI), transType(CI->getArgOperand(0)->getType()), 
BB);
+  }
   case OpGroupNonUniformShuffleDown: {
     Function *F = CI->getCalledFunction();
     if (F->arg_size() && F->getArg(0)->hasStructRetAttr()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/libSPIRV/SPIRVModule.cpp 
new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/libSPIRV/SPIRVModule.cpp
--- old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/libSPIRV/SPIRVModule.cpp 
2025-01-13 11:23:23.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/libSPIRV/SPIRVModule.cpp 
2025-02-26 13:41:00.000000000 +0100
@@ -277,6 +277,9 @@
   SPIRVTypeTaskSequenceINTEL *addTaskSequenceINTELType() override;
   SPIRVInstruction *addTaskSequenceGetINTELInst(SPIRVType *, SPIRVValue *,
                                                 SPIRVBasicBlock *) override;
+  SPIRVInstruction *
+  addCooperativeMatrixLengthKHRInst(SPIRVType *, SPIRVType *,
+                                    SPIRVBasicBlock *) override;
   SPIRVType *addOpaqueGenericType(Op) override;
   SPIRVTypeDeviceEvent *addDeviceEventType() override;
   SPIRVTypeQueue *addQueueType() override;
@@ -1076,6 +1079,14 @@
       BB);
 }
 
+SPIRVInstruction *SPIRVModuleImpl::addCooperativeMatrixLengthKHRInst(
+    SPIRVType *RetTy, SPIRVType *MatTy, SPIRVBasicBlock *BB) {
+  return addInstruction(
+      SPIRVInstTemplateBase::create(OpCooperativeMatrixLengthKHR, RetTy,
+                                    getId(), getVec(MatTy->getId()), BB, this),
+      BB);
+}
+
 SPIRVType *SPIRVModuleImpl::addOpaqueGenericType(Op TheOpCode) {
   return addType(new SPIRVTypeOpaqueGeneric(TheOpCode, this, getId()));
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/libSPIRV/SPIRVModule.h 
new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/libSPIRV/SPIRVModule.h
--- old/SPIRV-LLVM-Translator-19.1.4/lib/SPIRV/libSPIRV/SPIRVModule.h   
2025-01-13 11:23:23.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/lib/SPIRV/libSPIRV/SPIRVModule.h   
2025-02-26 13:41:00.000000000 +0100
@@ -269,6 +269,9 @@
   virtual SPIRVTypeTaskSequenceINTEL *addTaskSequenceINTELType() = 0;
   virtual SPIRVInstruction *
   addTaskSequenceGetINTELInst(SPIRVType *, SPIRVValue *, SPIRVBasicBlock *) = 
0;
+  virtual SPIRVInstruction *
+  addCooperativeMatrixLengthKHRInst(SPIRVType *, SPIRVType *,
+                                    SPIRVBasicBlock *) = 0;
   virtual SPIRVTypeVoid *addVoidType() = 0;
   virtual SPIRVType *addOpaqueGenericType(Op) = 0;
   virtual SPIRVTypeDeviceEvent *addDeviceEventType() = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/DebugInfo/NonSemantic/Shader200/DebugLinePriority.spt
 
new/SPIRV-LLVM-Translator-19.1.5/test/DebugInfo/NonSemantic/Shader200/DebugLinePriority.spt
--- 
old/SPIRV-LLVM-Translator-19.1.4/test/DebugInfo/NonSemantic/Shader200/DebugLinePriority.spt
 2025-01-13 11:23:23.000000000 +0100
+++ 
new/SPIRV-LLVM-Translator-19.1.5/test/DebugInfo/NonSemantic/Shader200/DebugLinePriority.spt
 2025-02-26 13:41:00.000000000 +0100
@@ -1,14 +1,15 @@
 ; RUN: llvm-spirv -to-binary %s -o %t.spv
+; RUN: spirv-val %t.spv
 ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
 ; RUN: llvm-dis %t.rev.bc -o %t.rev.ll
 ; RUN: FileCheck < %t.rev.ll %s -check-prefix=CHECK-LLVM
 
-; CHECK-LLVM: %[[#Var:]] = load i32, ptr @_ZN5Outer5Inner6globalE, align 4, 
!dbg ![[#LineLoc:]]
+; CHECK-LLVM: %[[#Var:]] = load i32, ptr addrspace(1) 
@_ZN5Outer5Inner6globalE, align 4, !dbg ![[#LineLoc:]]
 ; CHECK-LLVM: %inc = add nsw i32 %[[#Var]], 1, !dbg ![[#DebugLineLoc:]]
 ; CHECK-LLVM: ![[#LineLoc]] = !DILocation(line: 357, column: 113, scope: 
![[#Scope:]])
 ; CHECK-LLVM: ![[#DebugLineLoc]] = !DILocation(line: 8, column: 16, scope: 
![[#Scope]])
 
-119734787 66560 393230 54 0 
+119734787 66560 393230 138 0 
 2 Capability Addresses 
 2 Capability Linkage 
 2 Capability Kernel 
@@ -49,11 +50,11 @@
 4 Constant 3 47 8 
 4 Constant 3 50 16 
 4 Constant 3 52 9 
-4 TypePointer 4 7 3 
+4 TypePointer 4 5 3 
 2 TypeVoid 7 
 3 TypeFunction 8 7 
 2 TypeBool 38 
-5 Variable 4 6 7 5 
+5 Variable 4 6 5 5 
 3 ConstantTrue 38 39 
 3 ConstantFalse 38 42 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/OpCopyMemory.spvasm 
new/SPIRV-LLVM-Translator-19.1.5/test/OpCopyMemory.spvasm
--- old/SPIRV-LLVM-Translator-19.1.4/test/OpCopyMemory.spvasm   2025-01-13 
11:23:23.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/test/OpCopyMemory.spvasm   2025-02-26 
13:41:00.000000000 +0100
@@ -46,6 +46,6 @@
                OpFunctionEnd
 
 ; CHECK-LABEL: define spir_kernel void @copymemory(ptr addrspace(1) %dstShort, 
ptr addrspace(1) %dstInt, ptr addrspace(1) %dstStruct)
-; CHECK: call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) %dstShort, ptr 
@pShort, i64 2, i1 false)
-; CHECK: call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) %dstInt, ptr @pInt, 
i64 4, i1 false)
-; CHECK: call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) %dstStruct, ptr 
@pStruct, i64 12, i1 false)
+; CHECK: call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) %dstShort, ptr 
%pShort, i64 2, i1 false)
+; CHECK: call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) %dstInt, ptr %pInt, 
i64 4, i1 false)
+; CHECK: call void @llvm.memcpy.p1.p0.i64(ptr addrspace(1) %dstStruct, ptr 
%pStruct, i64 12, i1 false)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/builtin_returns_struct.spvasm 
new/SPIRV-LLVM-Translator-19.1.5/test/builtin_returns_struct.spvasm
--- old/SPIRV-LLVM-Translator-19.1.4/test/builtin_returns_struct.spvasm 
1970-01-01 01:00:00.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/test/builtin_returns_struct.spvasm 
2025-02-26 13:41:00.000000000 +0100
@@ -0,0 +1,52 @@
+; REQUIRES: spirv-as
+; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
+; RUN: spirv-val %t.spv
+; RUN: llvm-spirv -r -o - %t.spv | llvm-dis | FileCheck %s
+
+               OpCapability Kernel
+               OpCapability Addresses
+               OpCapability Int8
+               OpCapability GenericPointer
+               OpCapability Linkage
+          %1 = OpExtInstImport "OpenCL.std"
+               OpMemoryModel Physical64 OpenCL
+               OpSource OpenCL_CPP 100000
+               OpName %a "a"
+               OpName %p "p"
+               OpName %foo "foo"
+               OpName %e "e"
+               OpName %math "math"
+               OpName %ov "ov"
+               OpDecorate %foo LinkageAttributes "foo" Export
+       %uint = OpTypeInt 32 0
+      %uchar = OpTypeInt 8 0
+%_ptr_Generic_uchar = OpTypePointer Generic %uchar
+          %5 = OpTypeFunction %uint %uint %_ptr_Generic_uchar
+       %bool = OpTypeBool
+  %_struct_7 = OpTypeStruct %uint %uint
+     %uint_1 = OpConstant %uint 1
+   %uchar_42 = OpConstant %uchar 42
+         %10 = OpConstantNull %uint
+        %foo = OpFunction %uint None %5
+          %a = OpFunctionParameter %uint
+          %p = OpFunctionParameter %_ptr_Generic_uchar
+         %19 = OpLabel
+               OpBranch %20
+         %20 = OpLabel
+          %e = OpPhi %uint %a %19 %math %21
+         %16 = OpIAddCarry %_struct_7 %e %uint_1
+       %math = OpCompositeExtract %uint %16 0
+         %17 = OpCompositeExtract %uint %16 1
+         %ov = OpINotEqual %bool %17 %10
+               OpBranchConditional %ov %22 %21
+         %21 = OpLabel
+               OpStore %p %uchar_42 Aligned 1
+               OpBranch %20
+         %22 = OpLabel
+               OpReturnValue %math
+               OpFunctionEnd
+
+; CHECK: %[[#Var:]] = alloca %structtype, align 8
+; CHECK: call spir_func void @_Z17__spirv_IAddCarryii(ptr sret(%structtype) 
%[[#Var:]]
+; CHECK: %[[#Load:]] = load %structtype, ptr %[[#Var]], align 4
+; CHECK-2: extractvalue %structtype %[[#Load:]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_checked.ll
 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_checked.ll
--- 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_checked.ll
 2025-01-13 11:23:23.000000000 +0100
+++ 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_checked.ll
 2025-02-26 13:41:00.000000000 +0100
@@ -25,8 +25,7 @@
 ; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#MatTy3:]] [[#Int8Ty]] 
[[#Const2]] [[#Const48]] [[#Const12]] [[#Const1]]
 ; CHECK-SPIRV: CooperativeMatrixConstructCheckedINTEL [[#MatTy1]]
 ; CHECK-SPIRV: CooperativeMatrixLoadCheckedINTEL [[#MatTy2]] [[#Load1:]]
-; TODO: Pass Matrix Type Id instead of Matrix Id to CooperativeMatrixLengthKHR.
-; CHECK-SPIRV: CooperativeMatrixLengthKHR [[#Int32Ty]] [[#]] [[#Load1]]
+; CHECK-SPIRV: CooperativeMatrixLengthKHR [[#Int32Ty]] [[#]] [[#MatTy2]]
 ; CHECK-SPIRV: CooperativeMatrixLoadCheckedINTEL [[#MatTy3]]
 ; CHECK-SPIRV: CooperativeMatrixMulAddKHR [[#MatTy1]]
 ; CHECK-SPIRV: CooperativeMatrixStoreCheckedINTEL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_prefetch.ll
 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_prefetch.ll
--- 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_prefetch.ll
        2025-01-13 11:23:23.000000000 +0100
+++ 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/INTEL/SPV_INTEL_joint_matrix/cooperative_matrix_prefetch.ll
        2025-02-26 13:41:00.000000000 +0100
@@ -25,8 +25,7 @@
 ; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#MatTy3:]] [[#Int8Ty]] 
[[#Const2]] [[#Const48]] [[#Const12]] [[#Const1]]
 ; CHECK-SPIRV: CompositeConstruct [[#MatTy1]]
 ; CHECK-SPIRV: CooperativeMatrixLoadKHR [[#MatTy2]] [[#Load1:]]
-; TODO: Pass Matrix Type Id instead of Matrix Id to CooperativeMatrixLengthKHR.
-; CHECK-SPIRV: CooperativeMatrixLengthKHR [[#Int32Ty]] [[#]] [[#Load1]]
+; CHECK-SPIRV: CooperativeMatrixLengthKHR [[#Int32Ty]] [[#]] [[#MatTy2]]
 ; CHECK-SPIRV: CooperativeMatrixPrefetchINTEL
 ; CHECK-SPIRV: CooperativeMatrixLoadKHR [[#MatTy3]]
 ; CHECK-SPIRV: CooperativeMatrixMulAddKHR [[#MatTy1]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/KHR/SPV_KHR_cooperative_matrix/cooperative_matrix.ll
 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/KHR/SPV_KHR_cooperative_matrix/cooperative_matrix.ll
--- 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/KHR/SPV_KHR_cooperative_matrix/cooperative_matrix.ll
       2025-01-13 11:23:23.000000000 +0100
+++ 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/KHR/SPV_KHR_cooperative_matrix/cooperative_matrix.ll
       2025-02-26 13:41:00.000000000 +0100
@@ -23,8 +23,7 @@
 ; CHECK-SPIRV-DAG: TypeCooperativeMatrixKHR [[#MatTy3:]] [[#Int8Ty]] 
[[#Const2]] [[#Const48]] [[#Const12]] [[#Const1]]
 ; CHECK-SPIRV: CompositeConstruct [[#MatTy1]]
 ; CHECK-SPIRV: CooperativeMatrixLoadKHR [[#MatTy2]] [[#Load1:]]
-; TODO: Pass Matrix Type Id instead of Matrix Id to CooperativeMatrixLengthKHR.
-; CHECK-SPIRV: CooperativeMatrixLengthKHR [[#Int32Ty]] [[#]] [[#Load1]]
+; CHECK-SPIRV: CooperativeMatrixLengthKHR [[#Int32Ty]] [[#]] [[#MatTy2]]
 ; CHECK-SPIRV: CooperativeMatrixLoadKHR [[#MatTy3]]
 ; CHECK-SPIRV: CooperativeMatrixMulAddKHR [[#MatTy1]]
 ; CHECK-SPIRV: CooperativeMatrixStoreKHR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/KHR/SPV_KHR_cooperative_matrix/length_legacy.spt
 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/KHR/SPV_KHR_cooperative_matrix/length_legacy.spt
--- 
old/SPIRV-LLVM-Translator-19.1.4/test/extensions/KHR/SPV_KHR_cooperative_matrix/length_legacy.spt
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/SPIRV-LLVM-Translator-19.1.5/test/extensions/KHR/SPV_KHR_cooperative_matrix/length_legacy.spt
   2025-02-26 13:41:00.000000000 +0100
@@ -0,0 +1,56 @@
+; This test is used to check that we do not break backward translation of 
`CooperativeMatrixLengthKHR`,
+; even in case when it was generated not specification conformant (as value, 
not type) in forward translation.
+
+; RUN: llvm-spirv %s -to-binary -o %t.spv
+; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll
+; RUN: FileCheck %s --input-file %t.ll
+
+; CHECK: call spir_func i32 
@_Z34__spirv_CooperativeMatrixLengthKHRPU3AS144__spirv_CooperativeMatrixKHR__uint_3_12_48_0(target("spirv.CooperativeMatrixKHR",
 i32, 3, 12, 48, 0)
+
+119734787 65536 393230 21 0 
+2 Capability Addresses 
+2 Capability Linkage 
+2 Capability Kernel 
+2 Capability Int64 
+2 Capability GenericPointer 
+2 Capability Int8 
+2 Capability CooperativeMatrixKHR 
+8 Extension "SPV_KHR_cooperative_matrix" 
+5 ExtInstImport 1 "OpenCL.std" 
+3 MemoryModel 2 2 
+3 Source 0 0 
+5 Name 7 "matr_mult" 
+5 Name 8 "_arg_accA" 
+4 Name 9 "_arg_K" 
+4 Name 10 "entry" 
+4 Name 12 "accA3" 
+3 Name 19 "m2" 
+3 Name 20 "len" 
+
+7 Decorate 7 LinkageAttributes "matr_mult" Export 
+4 Decorate 8 Alignment 1 
+4 TypeInt 3 8 0 
+4 TypeInt 5 64 0 
+4 TypeInt 13 32 0 
+4 Constant 13 14 3 
+4 Constant 13 15 12 
+4 Constant 13 16 48 
+4 Constant 13 17 0 
+2 TypeVoid 2 
+4 TypePointer 4 5 3 
+5 TypeFunction 6 2 4 5 
+4 TypePointer 11 8 3 
+7 TypeCooperativeMatrixKHR 18 13 14 15 16 17 
+
+5 Function 2 7 0 6 
+3 FunctionParameter 4 8 
+3 FunctionParameter 5 9 
+
+2 Label 10 
+4 PtrCastToGeneric 11 12 8 
+7 CooperativeMatrixLoadKHR 18 19 12 17 9 1 
+4 CooperativeMatrixLengthKHR 13 20 19 
+1 Return 
+
+1 FunctionEnd 
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SPIRV-LLVM-Translator-19.1.4/test/var_function_init.spvasm 
new/SPIRV-LLVM-Translator-19.1.5/test/var_function_init.spvasm
--- old/SPIRV-LLVM-Translator-19.1.4/test/var_function_init.spvasm      
1970-01-01 01:00:00.000000000 +0100
+++ new/SPIRV-LLVM-Translator-19.1.5/test/var_function_init.spvasm      
2025-02-26 13:41:00.000000000 +0100
@@ -0,0 +1,34 @@
+; Check translation of OpVariable with Function storage and initializer.
+
+; REQUIRES: spirv-as
+; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
+; RUN: spirv-val %t.spv
+; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
+; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s
+
+               OpCapability Addresses
+               OpCapability Kernel
+               OpCapability Int64
+               OpMemoryModel Physical64 OpenCL
+               OpEntryPoint Kernel %kernel "test"
+               OpName %pvalue "pvalue"
+       %uint = OpTypeInt 32 0
+      %ulong = OpTypeInt 64 0
+       %void = OpTypeVoid
+   %gptr_int = OpTypePointer CrossWorkgroup %uint
+   %pptr_int = OpTypePointer Function %uint
+ %kernel_sig = OpTypeFunction %void %gptr_int
+    %uint_42 = OpConstant %uint 42
+    %ulong_4 = OpConstant %ulong 4
+     %kernel = OpFunction %void None %kernel_sig
+        %dst = OpFunctionParameter %gptr_int
+      %entry = OpLabel
+     %pvalue = OpVariable %pptr_int Function %uint_42
+               OpCopyMemorySized %dst %pvalue %ulong_4 Volatile
+               OpReturn
+               OpFunctionEnd
+
+; CHECK-LABEL: define spir_kernel void @test
+; CHECK: %pvalue = alloca i32, align 4
+; CHECK: store i32 42, ptr %pvalue, align 4
+; CHECK: call void @llvm.memcpy.p1.p0.i64

Reply via email to