[Mlir-commits] [mlir] [mlir][arith] Add nneg to extui and uitofp. (PR #183165)
Erick Ochoa Lopez
llvmlistbot at llvm.org
Wed Feb 25 08:33:31 PST 2026
================
@@ -1172,14 +1172,19 @@ def Arith_RemFOp : Arith_FloatBinaryOp<"remf"> {
// ExtUIOp
//===----------------------------------------------------------------------===//
-def Arith_ExtUIOp : Arith_IToICastOp<"extui"> {
+def Arith_ExtUIOp :
+ Arith_IToICastOp<"extui", [DeclareOpInterfaceMethods<ArithNonNegFlagInterface>]> {
let summary = "integer zero extension operation";
let description = [{
The integer zero extension operation takes an integer input of
width M and an integer destination type of width N. The destination
bit-width must be larger than the input bit-width (N > M).
The top-most (N - M) bits of the output are filled with zeros.
+ This op supports an `nneg` flag. If the flag is present, the operand
+ is known to be non-negative, i.e. the sign bit is zero. This allows
+ the zero extension to be treated as a sign extension.
----------------
amd-eochoalo wrote:
https://github.com/llvm/llvm-project/pull/183165/commits/d5f10d9be357e252954797ccf6b94822f0f4ecdc
https://github.com/llvm/llvm-project/pull/183165
More information about the Mlir-commits
mailing list