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

Corentin Ferry llvmlistbot at llvm.org
Fri May 31 01:04:19 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:

This comment meant that signless integers weren't preserved. We however don't need to say anything about signless integers if we know the spec of the function is to get either a signed or an unsigned type.

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


More information about the Mlir-commits mailing list