Do not add spirv::BitcastOp for cast from signed to unsigned type.
authorMahesh Ravishankar <ravishankarm@google.com>
Mon, 7 Oct 2019 21:51:31 +0000 (14:51 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Mon, 7 Oct 2019 21:52:00 +0000 (14:52 -0700)
commit37e0e8cf16650b8d99e1f044c63fc69cca8f0899
treefb8155ac7b44f9f6170cde5af70fd3a22157b0d5
parent5a1108c9a683b8b8f48cc4e6f870e21c8807d8ff
Do not add spirv::BitcastOp for cast from signed to unsigned type.

Since MLIR integer types don't make a distinction between signed vs
unsigned integers, during deserialization of SPIR-V binaries, the
OpBitcast might result in a cast from/to the same type. Do not add a
spv.Bitcast operation to the spv.module in these cases.

PiperOrigin-RevId: 273381887
mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp