Changes

Summary

  1. [libomptarget] Run GPU offloading tests on both new and old runtime (details)
  2. [flang] Fix crash on empty formatted external READs (details)
  3. [flang] Extension: allow tabs in output format strings (details)
  4. [flang] Fix DOT_PRODUCT for logical (details)
  5. [flang] Fix NAMELIST input bug with multiple subscript triplets (details)
  6. [flang] Support legacy usage of 'A' edit descriptors for integer & real (details)
  7. Support: Skip buffering buffer_unique_ostream's owned stream (details)
  8. [gn build] Port e18ea6f2946a (details)
  9. [tools, utils] Use StringRef::contains (NFC) (details)
  10. [flang] Fix buildbot (new warnings on old code) (details)
  11. [NFC][X86] Add MC tests for all untested VIA PadLock instructions (details)
  12. [X86] Don't add implicit REP prefix to VIA PadLock xstore (details)
Commit bf6f955f393f9922ac743ff2055bf867a7a071ae by jonathanchesterfield
[libomptarget] Run GPU offloading tests on both new and old runtime

Implemented by patching python config instead of modifying all
the tests so that -generic and XFAIL work as usual. Expectation is for
this to be reverted once the old runtime is deleted.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D112225
The file was modifiedopenmp/libomptarget/CMakeLists.txt
The file was modifiedopenmp/libomptarget/plugins/amdgpu/CMakeLists.txt
The file was modifiedopenmp/libomptarget/test/unified_shared_memory/api.c
The file was modifiedopenmp/libomptarget/test/lit.cfg
The file was modifiedopenmp/libomptarget/plugins/cuda/CMakeLists.txt
Commit ce71f8e01742598f9f0b563d259561e755e1cbce by pklausler
[flang] Fix crash on empty formatted external READs

ExternalFileUnit::BeginReadingRecord() must be called at least once
during an external formatted READ statement before FinishReadingRecord().
In the case of a formatted external READ with no data items, the call
to finish processing of the format (which might have lingering control
items that need doing) was taking place before the call to BeginReadingRecord
from ExternalIoStatementState::EndIoStatement.  Add a call to
BeginReadingRecord on this path.

Differential Revision: https://reviews.llvm.org/D112351
The file was modifiedflang/runtime/io-stmt.cpp
Commit fbb020fb48be454da35c77798dc63fd3304c0b80 by pklausler
[flang] Extension: allow tabs in output format strings

A CHARACTER variable used as an output format may contain
unquoted tab characters, which are treated as if they had
been quoted.  This is an extension supported by all other
Fortran compilers to which I have access.

Differential Revision: https://reviews.llvm.org/D112350
The file was modifiedflang/runtime/format-implementation.h
The file was modifiedflang/docs/Extensions.md
Commit f6aac0dd4d130a41785fd320fb66377631557f6c by pklausler
[flang] Fix DOT_PRODUCT for logical

A build-time check in a template class instantiation was applying
a test that's meaningful only for numeric types.

Differential Revision: https://reviews.llvm.org/D112345
The file was modifiedflang/runtime/dot-product.cpp
Commit 89a927c6781200701b01ae4f48bac16e6f082549 by pklausler
[flang] Fix NAMELIST input bug with multiple subscript triplets

NAMELIST input can contain array subscripts with triplet notation.
The calculation of the default effective stride for the constructed
array descriptor was simply incorrect after the first dimension.

Differential Revision: https://reviews.llvm.org/D112347
The file was modifiedflang/runtime/namelist.cpp
Commit b83242e20e099c9cc4ba90a63abda8ba6e2f32d5 by pklausler
[flang] Support legacy usage of 'A' edit descriptors for integer & real

The 'A' edit descriptor once served as a form of raw I/O of bytes
to/from variables that weren't of type CHARACTER (which itself
didn't exist until F'77).  This usage was especially common for
output of numeric variables that had been initialized with Hollerith.

Differential Revision: https://reviews.llvm.org/D112346
The file was modifiedflang/unittests/Runtime/RuntimeCrashTest.cpp
The file was modifiedflang/runtime/edit-output.cpp
The file was modifiedflang/runtime/edit-input.cpp
Commit e18ea6f2946a10042258b976e60166a926ee939a by Duncan P. N. Exon Smith
Support: Skip buffering buffer_unique_ostream's owned stream

Change buffer_unique_ostream's constructor to call
raw_ostream::SetUnbuffered() on its owned stream. Otherwise,
buffer_unique_ostream's destructor could cause the owned stream to
temporarily allocate a buffer only to be immediately flushed.

Also add some tests for buffer_ostream and buffer_unique_ostream. Use
the same naming scheme as other raw_ostream-related tests (e.g.,
`raw_ostreamTest` for the fixture, `raw_ostream_test.cpp` for the
filename).

(I considered changing buffer_ostream in the same way (calling
SetUnbuffered on the referenced stream), but that seemed like overreach
since the client may have more things to write.)

(I considered merging buffer_ostream and buffer_unique_ostream into a
single class (with a `raw_ostream&` and a `std::unique_ptr` that is only
sometimes used), but that makes the class bigger and the small amount of
code deduplication seems uncompelling.)

Differential Revision: https://reviews.llvm.org/D110369
The file was modifiedllvm/include/llvm/Support/raw_ostream.h
The file was modifiedllvm/unittests/Support/CMakeLists.txt
The file was addedllvm/unittests/Support/buffer_ostream_test.cpp
Commit ec2a25296fec191a43a19fd2b5e3b8f6dadc4209 by llvmgnsyncbot
[gn build] Port e18ea6f2946a
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
Commit 4e3eebc6bd326441c11f5ecd71284d42157c302d by kazu
[tools, utils] Use StringRef::contains (NFC)
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was modifiedllvm/utils/TableGen/X86RecognizableInstr.cpp
The file was modifiedllvm/tools/llvm-profdata/llvm-profdata.cpp
The file was modifiedllvm/utils/TableGen/X86FoldTablesEmitter.cpp
The file was modifiedllvm/tools/llvm-cov/CoverageFilters.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/utils/TableGen/AsmMatcherEmitter.cpp
Commit fc3f92a8f457d3067aeb7043e876cfa437c24e31 by pklausler
[flang] Fix buildbot (new warnings on old code)

The clang-aarch64-full-2stage buildbot is complaining about a
warning with three instances in f18 code (none modified recently).
The warning is for using the | bitwise OR operator on bool operands.

In one instance, the bitwise operator was being used instead of the
logical || operator in order to avoid short-circuting.  The fix
requires using some temporary variables.  In the other two instances,
the bitwise operator seemed more idiomatic in context, but can be
replaced without harm with the logical operator.

Pushing without review as confidence is high and nobody wants
a buildbot to stay sad for long.
The file was modifiedflang/lib/Semantics/check-declarations.cpp
The file was modifiedflang/lib/Evaluate/tools.cpp
Commit b432583d28ee99313fa834139be9535639957d76 by jrtc27
[NFC][X86] Add MC tests for all untested VIA PadLock instructions

We currently only test the encoding of xstore but none of the other
instructions, which should all have their implicit REP prefix be
verified as working.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D112354
The file was modifiedllvm/test/MC/X86/padlock.s
Commit 2d8c18fbbdd1b07ab0d36ac49ef63f4d243afb8b by jrtc27
[X86] Don't add implicit REP prefix to VIA PadLock xstore

Commit 8fa3e8fa1492 added an implicit REP prefix to all VIA PadLock
instructions, but GNU as doesn't add one to xstore, only all the others.
This resulted in a kernel panic regression in FreeBSD upon updating to
LLVM 11 (https://bugs.freebsd.org/259218) which includes the commit in
question. This partially reverts that commit.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D112355
The file was modifiedllvm/lib/Target/X86/X86InstrSystem.td
The file was modifiedllvm/test/MC/X86/padlock.s