[Mlir-commits] [mlir] [mlir][emitc] Lower arith.andi, arith.ori, arith.xori to EmitC (PR #93666)

Corentin Ferry llvmlistbot at llvm.org
Sun Jun 2 23:52:03 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.
----------------
cferry-AMD wrote:

They're still allowed, and the new comment is clearer on what happens to them: we get either a signed, or an unsigned equivalent type; shall we mention that the input may be signed, unsigned or signless?

https://github.com/llvm/llvm-project/pull/93666


More information about the Mlir-commits mailing list