[all-commits] [llvm/llvm-project] 8761f5: [mlir][Support] Avoid multiplication in floorDiv /...

Stephan Herhut via All-commits all-commits at lists.llvm.org
Tue Dec 21 02:51:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8761f5ebf754fbcedb25c023c30492e60ff3c19d
      https://github.com/llvm/llvm-project/commit/8761f5ebf754fbcedb25c023c30492e60ff3c19d
  Author: Stephan Herhut <herhut at google.com>
  Date:   2021-12-21 (Tue, 21 Dec 2021)

  Changed paths:
    M mlir/include/mlir/Support/MathExtras.h
    M mlir/unittests/Support/MathExtrasTest.cpp

  Log Message:
  -----------
  [mlir][Support] Avoid multiplication in floorDiv / ceilDiv

Using comparisons instead avoids potential overflow.

Differential Revision: https://reviews.llvm.org/D116096




More information about the All-commits mailing list