Currently sext, zext and trunc operations for integers are missing in the standard dialect.
If one wants to combine integers of different bit-widths, one has to use the LLVM operations
for extending/truncating and introduce custom casts to convert LLVM integer types to
standard types. Exposing sext, zext and trunc directly in the standard dialect allows to
perfom integer conversions without this hassle.
Since this is my first addition to MLIR, I'd like some feedback for the implementation, especially:
Naming of the operations and their memonics
Are the tests sufficient as is or should I add more (if so, where)?
Currently sext, zext and trunc operations for integers are missing in the standard dialect. If one wants to combine integers of different bit-widths, one has to use the LLVM operations for extending/truncating and introduce custom casts to convert LLVM integer types to standard types. Exposing sext, zext and trunc directly in the standard dialect allows to perfom integer conversions without this hassle.
Since this is my first addition to MLIR, I'd like some feedback for the implementation, especially: