[all-commits] [llvm/llvm-project] 778487: [flang] Add tests for MIN for character arrays. NFC

Diana via All-commits all-commits at lists.llvm.org
Fri May 7 01:54:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 778487a221496e92795afab147c3a030c74ad356
      https://github.com/llvm/llvm-project/commit/778487a221496e92795afab147c3a030c74ad356
  Author: Diana Picus <diana.picus at linaro.org>
  Date:   2021-05-07 (Fri, 07 May 2021)

  Changed paths:
    M flang/unittests/RuntimeGTest/CharacterTest.cpp

  Log Message:
  -----------
  [flang] Add tests for MIN for character arrays. NFC

We used to test only scalar character types. This commit adds tests for
arrays with a few simple shapes.

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


  Commit: 2ea36e94927ccbc1f8e915a4e5c932531e69f02d
      https://github.com/llvm/llvm-project/commit/2ea36e94927ccbc1f8e915a4e5c932531e69f02d
  Author: Diana Picus <diana.picus at linaro.org>
  Date:   2021-05-07 (Fri, 07 May 2021)

  Changed paths:
    M flang/runtime/character.cpp
    M flang/unittests/RuntimeGTest/CharacterTest.cpp

  Log Message:
  -----------
  [flang] Remove redundant reallocation

The MaxMinHelper used to implement MIN and MAX for character types would
reallocate the accumulator whenever the number of characters in it was
different from that in the other input. This is unnecessary if the
accumulator is already larger than the other input. This patch fixes the
issue and adds a unit test to make sure we don't reallocate if we don't
need to.

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


Compare: https://github.com/llvm/llvm-project/compare/cf06c8eee3a5...2ea36e94927c


More information about the All-commits mailing list