[all-commits] [llvm/llvm-project] 315c88: [flang] Fixed MODULO(x, inf) to produce NaN. (#86145)

Slava Zakharin via All-commits all-commits at lists.llvm.org
Wed Apr 3 10:50:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 315c88c5fbdb2b27cebf23c87fb502f7a567d84b
      https://github.com/llvm/llvm-project/commit/315c88c5fbdb2b27cebf23c87fb502f7a567d84b
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    M flang/lib/Optimizer/Builder/Runtime/Numeric.cpp
    M flang/runtime/numeric-templates.h
    M flang/test/Lower/Intrinsics/modulo.f90
    M flang/unittests/Runtime/Numeric.cpp

  Log Message:
  -----------
  [flang] Fixed MODULO(x, inf) to produce NaN. (#86145)

Straightforward computation of `A − FLOOR (A / P) * P` should
produce NaN, when P is infinity. The -menable-no-infs lowering
can still use the relaxed operations sequence.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list