[all-commits] [llvm/llvm-project] 54784b: [flang] Fold OUT_OF_RANGE()

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Aug 29 09:49:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 54784b1831651a5f47ebafdb1f79a3380ac4a46b
      https://github.com/llvm/llvm-project/commit/54784b1831651a5f47ebafdb1f79a3380ac4a46b
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-08-29 (Tue, 29 Aug 2023)

  Changed paths:
    M flang/lib/Evaluate/fold-logical.cpp
    R flang/test/Evaluate/fold-merge-bits.f90
    A flang/test/Evaluate/fold-merge_bits.f90
    A flang/test/Evaluate/fold-out_of_range.f90

  Log Message:
  -----------
  [flang] Fold OUT_OF_RANGE()

Fold the F'2018 intrinsic function OUT_OF_RANGE(), which returns .TRUE.
when a conversion of an integer or real value to an integer or real type
would yield an overflow or (for real->integer only) invalid operand
exception.  Test all type combinations, with both rounding possibilities
for the real->integer cases.

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




More information about the All-commits mailing list