diff options
author | Davide Grohmann <davide.grohmann@arm.com> | 2025-07-28 18:34:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-28 12:34:30 -0400 |
commit | 0121a8e4319619527c9c28bbc01c74f794cc2255 (patch) | |
tree | 46de3309eeb7776352036a64e5326358d729076f /mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp | |
parent | 496d31c8a9d69ded50e4aa7fbd5c5ba1ffd3ef2c (diff) | |
download | llvm-0121a8e4319619527c9c28bbc01c74f794cc2255.zip llvm-0121a8e4319619527c9c28bbc01c74f794cc2255.tar.gz llvm-0121a8e4319619527c9c28bbc01c74f794cc2255.tar.bz2 |
Reland "[mlir][spirv] Fix int type declaration duplication when serializing" (#145687)
This relands PRs #143108 and #144538.
The original PR was reverted due to a mistake that made all the mlir
tests run only if SPIRV target was enabled. This is now resolved since
enabling spirv-tools does not required SPIRV target any longer.
spirv-tools are not required by default to run SPIRV mlir tests, but
they can be optionally enabled in some SPIRV mlir test to verify that
the produced SPIRV assembly pass validation.
The other reverted PR #144685 is not longer needed and not part of this
relanding.
Original commit message:
> 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@arm.com>
Diffstat (limited to 'mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp')
0 files changed, 0 insertions, 0 deletions