diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp --- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp @@ -1122,12 +1122,13 @@ // Sugar i1 constants with 'true' and 'false'. if (intTy && intTy.getWidth() == 1) - return setNameFn(getResult(), (intCst.getInt() ? "true" : "false")); + return setNameFn(getResult(), + (intCst.getValue().getZExtValue() ? "true" : "false")); // Otherwise, build a complex name with the value and type. SmallString<32> specialNameBuffer; llvm::raw_svector_ostream specialName(specialNameBuffer); - specialName << 'c' << intCst.getInt(); + specialName << 'c' << intCst.getValue().getSExtValue(); if (intTy) specialName << '_' << type; setNameFn(getResult(), specialName.str());