[PATCH 84/85] Add support for ISubBorrow SPIRV instruction (#2168)
authorbwlodarcz <bertrand.wlodarczyk@intel.com>
Fri, 13 Oct 2023 10:33:06 +0000 (12:33 +0200)
committerAndreas Beckmann <anbe@debian.org>
Thu, 14 Mar 2024 19:01:08 +0000 (20:01 +0100)
commitcaeb0fb926799a1b91396ecd1aab48633d58a055
tree31c5db332c5f87440153b095232e625c9900580c
parent9bb780eb92fc5eaa0b6cc82b8a1c10b715a9339d
[PATCH 84/85] Add support for ISubBorrow SPIRV instruction (#2168)

This commit implements bidirectional translation of the llvm.usub.with.overflow and the ISubBorrow intrinsic.
Intrinsic llvm.usub.with.overflow returns struct which second element have a type of i1.
The llvm type i1 is, in llvm-spirv, directly translated to BoolType.
SPIRV specification requires that the composite which returns from ISubBorrow needs to have both elements of the same type.
In result, current implementation is not compliant and should be considered temporary.

Gbp-Pq: Name 0084-Add-support-for-ISubBorrow-SPIRV-instruction-2168.patch
lib/SPIRV/SPIRVReader.cpp
lib/SPIRV/SPIRVWriter.cpp
lib/SPIRV/libSPIRV/SPIRVEntry.h
lib/SPIRV/libSPIRV/SPIRVInstruction.h
lib/SPIRV/libSPIRV/SPIRVOpCode.h
test/llvm-intrinsics/usub.with.overflow.ll [new file with mode: 0644]