[all-commits] [llvm/llvm-project] 2b5cd3: [flang] Use naive algorithm for folding complex di...

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Aug 18 15:16:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b5cd3778c5008ce519fb74502acaa3a304a3726
      https://github.com/llvm/llvm-project/commit/2b5cd3778c5008ce519fb74502acaa3a304a3726
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-08-18 (Thu, 18 Aug 2022)

  Changed paths:
    M flang/lib/Evaluate/complex.cpp

  Log Message:
  -----------
  [flang] Use naive algorithm for folding complex division when it doesn't over/underflow

f18 unconditionally uses a scaling algorithm for complex/complex division
that avoids needless overflows and underflows when computing the sum of
the squares of the components of the denominator -- but testing has shown
some 1 ULP differences relative to the naive calculation due to the
extra operations and roundings.  So use the scaling algorithm only when
the naive calculation actually would overflow or underflow.

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




More information about the All-commits mailing list