[PATCH] D75611: [mlir][spirv] Support integer signedness

Mahesh Ravishankar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 10:39:25 PST 2020


mravishankar accepted this revision.
mravishankar added a comment.
This revision is now accepted and ready to land.

Minor nits, but happy to see that this got resolved and bitcast can now be autogened.



================
Comment at: mlir/docs/Dialects/SPIR-V.md:261
+dialects. However, SPIR-V spec only defines two signedness semantics state: 0
+indicates unsigned, or no signedness semantics, 1 indicates signed semantics. So
+both `iN` and `uiN` are serialized into the same `OpTypeInt N 0`. For
----------------
Do we need no signedness semantics. This is effectively saying no signedness is same as unsigned. Might as well make that explicit?


================
Comment at: mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td:2948
 
+class IOrUI<int width>
+    : Type<Or<[CPred<"$_self.isSignlessInteger(" # width # ")">,
----------------
Just to make sure I understand this, the presence of "signless" is effectively legacy. We are treating them as unsigned implicitly. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75611/new/

https://reviews.llvm.org/D75611





More information about the llvm-commits mailing list