Changes

Summary

  1. [InstCombine] Precommit new and-xor-or.ll tests. NFC. (details)
  2. [ScheduleDAGInstrs] Call adjustSchedDependency in more cases (details)
  3. [AMDGPU] Fix latency for implicit vcc_lo operands on GFX10 wave32 (details)
  4. [lldb/Formatters] Remove space from vector type string summaries (NFCI) (details)
  5. [AMDGPU] Run SIShrinkInstructions before post-RA scheduling (details)
  6. [mlir][Linalg] NFC - Drop Optional in favor of FailureOr (details)
  7. AMDGPU: Fix hardcoded registers in tests (details)
  8. AMDGPU: Regenerate MIR test checks (details)
  9. [flang] Extension to distinguish specific procedures (details)
  10. Support: Use Expected<T>::moveInto() in a few places (details)
  11. [libc++][NFC] Remove duplicate Python imports (details)
  12. [X86] Fix bad formatting. NFC (details)
  13. AMDGPU: Don't consider whether amdgpu-flat-work-group-size was set (details)
  14. AMDGPU: Use attributor to propagate amdgpu-flat-work-group-size (details)
  15. Fix locals naming in DNBArchMachARM64::GetGPRState for 32-bit builds (details)
  16. [mlir][Linalg] Retire CodegenStrategy::transform (details)
  17. [lld-macho] Implement -oso_prefix (details)
  18. [flang] Support NAMELIST input of short arrays (details)
  19. [flang] Fix generic resolution case (details)
  20. [flang] Speed common runtime cases of DOT_PRODUCT & MATMUL (details)
  21. [BasicAA] Model implicit trunc of GEP indices (details)
  22. [libomptarget] Run GPU offloading tests on both new and old runtime (details)
  23. [flang] Fix crash on empty formatted external READs (details)
  24. [flang] Extension: allow tabs in output format strings (details)
  25. [flang] Fix DOT_PRODUCT for logical (details)
  26. [flang] Fix NAMELIST input bug with multiple subscript triplets (details)
  27. [flang] Support legacy usage of 'A' edit descriptors for integer & real (details)
Commit 55f7cc1a9a2a9f58338c9608bef0c627886d0db9 by Stanislav.Mekhanoshin
[InstCombine] Precommit new and-xor-or.ll tests. NFC.
The file was modifiedllvm/test/Transforms/InstCombine/and-xor-or.ll
Commit 2915889d74b124d3105d1e7583fbfb1cf1bad10d by jay.foad
[ScheduleDAGInstrs] Call adjustSchedDependency in more cases

This removes a condition and the corresponding FIXME comment, because
the Hexagon assertion it refers to has apparently been fixed, probably
by D76134.

NFCI. This just gives targets the opportunity to adjust latencies that
were set to 0 by the generic code because they involve "implicit pseudo"
operands.

Differential Revision: https://reviews.llvm.org/D112306
The file was modifiedllvm/lib/CodeGen/ScheduleDAGInstrs.cpp
Commit 3f34f75a68c34cc859d97943673ee44925702d10 by jay.foad
[AMDGPU] Fix latency for implicit vcc_lo operands on GFX10 wave32

As described in the comment, the way we change vcc to vcc_lo in these
operands confuses addPhysRegDataDeps into treating them as implicit
pseudo operands. Fix this by setting the correct latency from the
SchedModel after addPhysRegDataDeps wrongly set it to 0.

Differential Revision: https://reviews.llvm.org/D112317
The file was modifiedllvm/test/CodeGen/AMDGPU/ds-sub-offset.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.div.fmas.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.h
Commit 42e4959253e0045a70ff9d8dcb664ce38434e302 by medismail.bennani
[lldb/Formatters] Remove space from vector type string summaries (NFCI)

This patch changes the string summaries for vector types by removing the
space between the type and the bracket, conforming to 277623f4d5a6.

This should also fix TestCompactVectors failure.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/DataFormatters/FormatManager.cpp
Commit 58e7ec471c3e379333c2ed45ea2a3f96afbc2d5f by jay.foad
[AMDGPU] Run SIShrinkInstructions before post-RA scheduling

Run post-RA SIShrinkInstructions just before post-RA scheduling, instead
of afterwards. After the fixes in D112305 and D112317 this seems to make
no difference, but it paves the way for scheduler tweaks that are
sensitive to the e32 vs e64 encoding of VALU instructions.

Differential Revision: https://reviews.llvm.org/D112341
The file was modifiedllvm/test/CodeGen/AMDGPU/llc-pipeline.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Commit 489fec2777881adbcc5fd013227ab84e3e4e69ff by nicolas.vasilache
[mlir][Linalg] NFC - Drop Optional in favor of FailureOr

Differential revision: https://reviews.llvm.org/D112332
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Loops.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Utils.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
Commit ae698f89b8a4ad9b4c75763c515e45d18ea55b01 by Matthew.Arsenault
AMDGPU: Fix hardcoded registers in tests
The file was modifiedllvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll
Commit 7d962f9ca36533d8eea85b92741b9bc41e35ecf7 by Matthew.Arsenault
AMDGPU: Regenerate MIR test checks

Recently this started using -NEXT checks, so regenerate these to avoid
extra test churn in a future change.
The file was modifiedllvm/test/CodeGen/AMDGPU/fdiv-nofpexcept.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-atomicrmw.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-inline-asm.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constrained-fp.ll
Commit c4ba1108dd6065dd3cce5edafcebbb6fe4fb3a0e by pklausler
[flang] Extension to distinguish specific procedures

Allocatable dummy arguments can be used to distinguish
two specific procedures in a generic interface when
it is the case that exactly one of them is polymorphic
or exactly one of them is unlimited polymorphic.  The
standard requires that an actual argument corresponding
to an (unlimited) polymorphic allocatable dummy argument
must also be an (unlimited) polymorphic allocatable, so an
actual argument that's acceptable to one procedure must
necessarily be a bad match for the other.

Differential Revision: https://reviews.llvm.org/D112237
The file was modifiedflang/include/flang/Common/Fortran-features.h
The file was modifiedflang/docs/Extensions.md
The file was modifiedflang/test/Semantics/resolve53.f90
The file was modifiedflang/lib/Semantics/check-declarations.cpp
The file was modifiedflang/include/flang/Evaluate/characteristics.h
The file was modifiedflang/lib/Evaluate/characteristics.cpp
Commit 2410fb4616b2c08bbaddd44e6c11da8285fbd1d3 by Duncan P. N. Exon Smith
Support: Use Expected<T>::moveInto() in a few places

These are some usage examples for `Expected<T>::moveInto()`.

Differential Revision: https://reviews.llvm.org/D112280
The file was modifiedllvm/lib/DebugInfo/Symbolize/Symbolize.cpp
The file was modifiedllvm/lib/XRay/InstrumentationMap.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/lib/Object/ObjectFile.cpp
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
Commit a41837d1dad3afe21eaba3900c12142e764c5838 by Louis Dionne
[libc++][NFC] Remove duplicate Python imports
The file was modifiedlibcxx/test/configs/llvm-libc++-shared.cfg.in
The file was modifiedlibcxx/test/configs/apple-libc++-shared.cfg.in
The file was modifiedlibcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
The file was modifiedlibcxx/test/configs/ibm-libc++-shared.cfg.in
The file was modifiedlibcxx/test/configs/llvm-libc++-static.cfg.in
Commit cd824f9e39c8d91cc25cca6d93a15a3a3b1bb1b4 by craig.topper
[X86] Fix bad formatting. NFC
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 8d4b74ac3f1fc90bef05ffb3ed7c0f7903f8ffe3 by Matthew.Arsenault
AMDGPU: Don't consider whether amdgpu-flat-work-group-size was set

It should be semantically identical if it was set to the same value as
the default. Also improve the documentation.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/target-cpu.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/attr-amdgpu-waves-per-eu.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/schedule-regpressure-limit3.ll
The file was modifiedllvm/docs/AMDGPUUsage.rst
The file was addedllvm/test/CodeGen/AMDGPU/default-flat-work-group-size-overrides-waves-per-eu.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/occupancy-levels.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.large.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/schedule-ilp.ll
Commit ec57b3755111bd81f5f3fd14b6d2489a2a205216 by Matthew.Arsenault
AMDGPU: Use attributor to propagate amdgpu-flat-work-group-size

This can merge the acceptable ranges based on the call graph, rather
than the simple application of the attribute. Remove the handling from
the old pass.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp
The file was removedllvm/test/CodeGen/AMDGPU/propagate-attributes-flat-work-group-size.ll
The file was addedllvm/test/CodeGen/AMDGPU/propagate-flat-work-group-size.ll
Commit e4235bdf26a2dd3b678daad4581d8e8edbc1aa7b by Jason Molenda
Fix locals naming in DNBArchMachARM64::GetGPRState for 32-bit builds

The local variables names used for logging when built on armv7k
weren't unique, resulting in build error.

rdar://84274006
The file was modifiedlldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
Commit 89d55d3c86f07178d20be36d3724d50a2e9322b7 by nicolas.vasilache
[mlir][Linalg] Retire CodegenStrategy::transform

Instead each pass should constructed a nested OpPassManager and runPipeline on that.

Differential Revision: https://reviews.llvm.org/D112308
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/CodegenStrategy.h
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp
Commit 236197e2d026193111580bd145f00367ba0c1afb by vyng
[lld-macho] Implement -oso_prefix

https://bugs.llvm.org/show_bug.cgi?id=50229

Differential Revision: https://reviews.llvm.org/D112291
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/test/MachO/stabs.s
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/Config.h
The file was modifiedlld/MachO/Driver.cpp
Commit b8452dba28e7449d0b1e47b5341ddf0bef55be68 by pklausler
[flang] Support NAMELIST input of short arrays

NAMELIST array input does not need to fully define an array.
If another input item begins after at least one element,
it ends input into the array and the remaining items are
not modified.

The tricky part of supporting this feature is that it's not
always easy to determine whether the next non-blank thing in
the input is a value or the next item's name, esp. in the case
of logical data where T and F can be names.  E.g.,

  &group logicalArray = t f f t
      = 1 /

should read three elements into "logicalArray" and then read
an integer or real variable named "t".

So the I/O runtime has to do some look-ahead to determine whether
the next thing in the input is a name followed by '=', '(', or '%'.
Since the '=' may be on a later record, possibly with intervening
NAMELIST comments, the runtime has to support a general form of
saving and restoring its current position.  The infrastructure
in the I/O runtime already has to support repositioning for
list-directed repetition, even on non-positionable input sources
like terminals and sockets; this patch adds an internal RAII API
to make it easier to save a position and then do arbitrary
look-ahead.

Differential Revision: https://reviews.llvm.org/D112245
The file was modifiedflang/runtime/connection.h
The file was modifiedflang/runtime/namelist.cpp
The file was modifiedflang/runtime/edit-input.cpp
The file was modifiedflang/runtime/namelist.h
The file was modifiedflang/runtime/descriptor-io.h
The file was modifiedflang/unittests/Runtime/Namelist.cpp
The file was modifiedflang/runtime/format.h
The file was modifiedflang/runtime/io-stmt.h
Commit 14b90d1fe0d79c8adbe8531ebc79199a8892a781 by pklausler
[flang] Fix generic resolution case

Don't try to convert INTEGER argument expressions to the kind of
the dummy argument when performing generic resolution; specific
procedures may be distinguished only by their kinds.

Differential Revision: https://reviews.llvm.org/D112240
The file was modifiedflang/lib/Semantics/expression.cpp
The file was modifiedflang/lib/Semantics/check-call.h
The file was modifiedflang/docs/Extensions.md
The file was modifiedflang/lib/Semantics/check-call.cpp
Commit a5a493e1920572ca78b77fcdaef68c26e96d25e7 by pklausler
[flang] Speed common runtime cases of DOT_PRODUCT & MATMUL

Look for contiguous numeric argument arrays at runtime and
use specialized code for them.

Differential Revision: https://reviews.llvm.org/D112239
The file was modifiedflang/runtime/matmul.cpp
The file was modifiedflang/runtime/dot-product.cpp
The file was modifiedflang/include/flang/Runtime/c-or-cpp.h
The file was modifiedflang/runtime/tools.h
The file was modifiedflang/include/flang/Runtime/descriptor.h
Commit 61cfdf636dc720c0af9d1ba42ead5aea8401d34b by nikita.ppv
[BasicAA] Model implicit trunc of GEP indices

GEP indices larger than the GEP index size are implicitly truncated
to the index size. BasicAA currently doesn't model this, resulting
in incorrect alias analysis results.

Fix this by explicitly modelling truncation in CastedValue in the
same way we do zext and sext. Additionally we need to disable a
number of optimizations for truncated values, in particular
"non-zero" and "non-equal" may no longer hold after truncation.
I believe the constant offset heuristic is also not necessarily
correct for truncated values, but wasn't able to come up with a
test for that one.

A possible followup here would be to use the new mechanism to
model explicit trunc as well (which should be much more common,
as it is the canonical form). This is straightforward, but omitted
here to separate the correctness fix from the analysis improvement.

(Side note: While I say "index size" above, BasicAA currently uses
the pointer size instead. Something for another day...)

Differential Revision: https://reviews.llvm.org/D110977
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/test/Analysis/BasicAA/gep-implicit-trunc-32-bit-pointers.ll
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/test/lit.cfg
The file was modifiedopenmp/libomptarget/plugins/amdgpu/CMakeLists.txt
The file was modifiedopenmp/libomptarget/plugins/cuda/CMakeLists.txt
The file was modifiedopenmp/libomptarget/CMakeLists.txt
The file was modifiedopenmp/libomptarget/test/unified_shared_memory/api.c
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/runtime/edit-input.cpp
The file was modifiedflang/unittests/Runtime/RuntimeCrashTest.cpp
The file was modifiedflang/runtime/edit-output.cpp