[all-commits] [llvm/llvm-project] 58d748: [flang] Fix overflow detection for folding SUM/PRO...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Jul 3 13:04:00 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58d7484360e7987fec6f893da4b3e36da04bb643
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-07-03 (Mon, 03 Jul 2023)

  Changed paths:
    M flang/lib/Evaluate/fold-reduction.h

  Log Message:
  [flang] Fix overflow detection for folding SUM/PRODUCT

The overflow detection code in the templates that fold SUM and PRODUCT
was checking for overflow before performing the reduction, not after.
Fix and add tests.

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

More information about the All-commits mailing list