[all-commits] [llvm/llvm-project] 549bc5: [mlir][spirv] Fix int type declaration duplication...
Davide Grohmann via All-commits
all-commits at lists.llvm.org
Tue Jun 17 07:35:41 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 549bc55cc39bb9fb22df464bcf3b7d4d4a5ff507
https://github.com/llvm/llvm-project/commit/549bc55cc39bb9fb22df464bcf3b7d4d4a5ff507
Author: Davide Grohmann <davide.grohmann at arm.com>
Date: 2025-06-17 (Tue, 17 Jun 2025)
Changed paths:
M mlir/lib/Target/SPIRV/Serialization/Serializer.cpp
M mlir/test/CMakeLists.txt
M mlir/test/Target/SPIRV/constant.mlir
M mlir/test/lit.cfg.py
A mlir/test/lit.local.cfg
M mlir/test/lit.site.cfg.py.in
Log Message:
-----------
[mlir][spirv] Fix int type declaration duplication when serializing (#143108)
At the MLIR level unsigned integer and signless integers are different
types. Indeed when looking up the two types in type definition cache
they do not match.
Hence when translating a SPIR-V module which contains both usign and
signless integers will contain the same type declaration twice
(something like OpTypeInt 32 0) which is not permitted in SPIR-V and
such generated modules fail validation.
This patch solves the problem by mapping unisgned integer types to
singless integer types before looking up in the type definition cache.
---------
Signed-off-by: Davide Grohmann <davide.grohmann at arm.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