Closed denis0x0D closed 5 years ago
Hey @denis0x0D, one question regarding the define_inst.sh
script. I think it does not handle the case of subclassing and omitting arguments/results well. Have you experienced that? Did you fixed it or something? Would be nice to upstream if you already got a fix for it. :)
No more comments from me. Thanks!
@antiagainst @MaheshRavishankar thanks a lot for review! @antiagainst it does not work with subclasses, I've already generated a susbset of operation, before the commit with arithmetic operations. I did not have a fix for this moment, but I can take a look, since it saves a lot of time.
Oh, I see. It also might be easier if we create a new .td
file for these binary ops and move them there so the main SPIRVOps.td
file can use the existing script.
But it does mean we may not have the automatic updates of documentation on those binary ops. But that would be fine for now given that the spec is fairly stable and changes with low frequency.
@antiagainst if it's ok, I can move them to a new *.td, with the next patch for other bin operations.
SGTM! Please have a PR for just moving stuff so it's easier to review. :)
@antiagainst got it, thanks!
This patch adds binary logical operations regarding to the spec section 3.32.15: OpIEqual, OpINotEqual, OpUGreaterThan, OpSGreaterThan, OpUGreaterThanEqual, OpSGreaterThanEqual, OpULessThan, OpSLessThan, OpULessThanEqual, OpSLessThanEqual, this ops are useful for integer comparison.
I've splitted bianary ops to logical ops and arithmetic ops. Also added custom parser, since default one does not fit the requirements (result type is different to operands type), and printer, verifier.
Tests added to ops.mlir and to serialization test machinery. Some tests related to arithmetic ops in ops.mlir reordered to the lexicographic order, since I was mistaken in previous commit.
@antiagainst @MaheshRavishankar can you please take a look? Thanks.