[Mlir-commits] [llvm] [mlir] mlir/MathExtras: consolidate with llvm/MathExtras (PR #95087)

Nikita Popov llvmlistbot at llvm.org
Tue Jun 11 12:45:53 PDT 2024


================
@@ -363,9 +363,9 @@ void UnrankedMemRefDescriptor::computeSizes(
   // Initialize shared constants.
   Value one = createIndexAttrConstant(builder, loc, indexType, 1);
   Value two = createIndexAttrConstant(builder, loc, indexType, 2);
-  Value indexSize =
-      createIndexAttrConstant(builder, loc, indexType,
-                              ceilDiv(typeConverter.getIndexTypeBitwidth(), 8));
+  Value indexSize = createIndexAttrConstant(
+      builder, loc, indexType,
+      llvm::divideCeilSigned(typeConverter.getIndexTypeBitwidth(), 8));
----------------
nikic wrote:

It looks like this used signed division by accident -- both quantities here are unsigned.

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


More information about the Mlir-commits mailing list