[all-commits] [llvm/llvm-project] b70f50: [flang] Fix folding of LEN(f(...))

Peter Klausler via All-commits all-commits at lists.llvm.org
Wed Jun 29 10:25:28 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b70f507c75ac327eba895a970b507467a325f03b
      https://github.com/llvm/llvm-project/commit/b70f507c75ac327eba895a970b507467a325f03b
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M flang/lib/Evaluate/call.cpp
    M flang/lib/Evaluate/variable.cpp
    M flang/test/Evaluate/rewrite01.f90

  Log Message:
  -----------
  [flang] Fix folding of LEN(f(...))

LEN(f(...)), where "f" is a non-intrinsic function, should not be folded
to anything else unless the result is a known constant value.  While there
are conceivable cases in which we could do better (e.g., an internal function
whose length is a host-associated INTENT(IN) dummy argument), there are
other cases that we're getting wrong.

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




More information about the All-commits mailing list