[Mlir-commits] [mlir] [mlir][emitc] Lower arith.andi, arith.ori, arith.xori to EmitC (PR #93666)
Matthias Gehre
llvmlistbot at llvm.org
Sun Jun 2 23:35:16 PDT 2024
================
@@ -40,6 +40,29 @@ class ArithConstantOpConversionPattern
}
};
+/// Check if the signedness of type \p ty matches the expected
+/// signedness, and issue a type with the correct signedness if
+/// necessary.
+Type adaptIntegralTypeSignedness(Type ty, bool needsUnsigned) {
+ if (isa<IntegerType>(ty)) {
+ // Turns signless integers into signed integers.
----------------
mgehre-amd wrote:
In the future, we should forbid using signless integers in the emitc dialect, but right now we still need to handle them.
https://github.com/llvm/llvm-project/pull/93666
More information about the Mlir-commits
mailing list