[all-commits] [llvm/llvm-project] 74c361: Add LLVMIR Dialect counterparts of @llvm.maximum a...

Andrew Pritchard via All-commits all-commits at lists.llvm.org
Tue Feb 9 16:58:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 74c3615997472b44ef77fedd7914d376f5e45ad7
      https://github.com/llvm/llvm-project/commit/74c3615997472b44ef77fedd7914d376f5e45ad7
  Author: Andrew Pritchard <awpr at google.com>
  Date:   2021-02-10 (Wed, 10 Feb 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/test/Target/llvmir-intrinsics.mlir

  Log Message:
  -----------
  Add LLVMIR Dialect counterparts of @llvm.maximum and @llvm.minimum.

These are similar to maxnum and minnum, but they're defined to treat -0
as less than +0.  This behavior can't be expressed using float
comparisons and selects, since comparisons are defined to treat
different-signed zeros as equal.  So, the only way to communicate this
behavior into LLVM IR without defining target-specific intrinsics is to
add the corresponding ops.

Reviewed By: mehdi_amini

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




More information about the All-commits mailing list