[all-commits] [llvm/llvm-project] 9016b2: [flang] Take result length into account in ApplyEl...

jeanPerier via All-commits all-commits at lists.llvm.org
Thu Aug 26 00:46:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9016b2a1cae244eb8f26826427eeb90eded0da20
      https://github.com/llvm/llvm-project/commit/9016b2a1cae244eb8f26826427eeb90eded0da20
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2021-08-26 (Thu, 26 Aug 2021)

  Changed paths:
    M flang/lib/Evaluate/fold-implementation.h
    A flang/test/Evaluate/folding22.f90

  Log Message:
  -----------
  [flang] Take result length into account in ApplyElementwise folding

ApplyElementwise on character operation was always creating a result
ArrayConstructor with the length of the left operand. This is not
correct for concatenation and SetLength operations.

Compute and thread the length to the spot creating the ArrayConstructor
so that the length is correct for those character operations.

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




More information about the All-commits mailing list