[PATCH] D108711: [flang] Take result length into account in ApplyElementwise folding

Jean Perier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 10:10:14 PDT 2021


jeanPerier created this revision.
jeanPerier added a reviewer: klausler.
jeanPerier added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
jeanPerier requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108711

Files:
  flang/lib/Evaluate/fold-implementation.h
  flang/test/Evaluate/folding22.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108711.368673.patch
Type: text/x-patch
Size: 6353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210825/60254c3d/attachment.bin>


More information about the llvm-commits mailing list