FailedChanges

Summary

  1. [X86] Support -march=sapphirerapids (details)
  2. PR37556: Don't diagnose conflicts between instantiated unqualified (details)
  3. [lldb] Don't depend on psutil in TestCompletion.py (details)
  4. [SyntaxTree] Extend the syntax tree dump to also cover `NodeRole` (details)
  5. [SyntaxTree] Update `Statement` tests to dump `NodeRole` (details)
  6. [SyntaxTree] Update `Expression` tests to dump `NodeRole` (details)
  7. [SyntaxTree] Update `Declaration` tests to dump `NodeRole` (details)
  8. [SyntaxTree] Update `Modifiable` tests to dump `NodeRole` and `unmodifiable` tag (details)
  9. [Compiler-RT] Fix profiler building with MinGW GCC (details)
  10. [compiler-rt][asan][test] Set LD_LIBRARY_PATH_{32,64} on Solaris (details)
  11. [NFC][RDA] Add explicit def check (details)
  12. [InstCombine] PHI-of-insertvalues -> insertvalue-of-PHI's (details)
  13. [DSE,MemorySSA] Cache accesses with/without reachable read-clobbers. (details)
  14. [SVE] Fix TypeSize related warnings with IR truncates of scalable vectors (details)
Commit e02d081f2b60b61eb60ef6a49b1a9f907e432d4c by freddy.ye
[X86] Support -march=sapphirerapids

Support -march=sapphirerapids for x86.
Compare with Icelake Server, it includes 14 more new features. They are
amxtile, amxint8, amxbf16, avx512bf16, avx512vp2intersect, cldemote,
enqcmd, movdir64b, movdiri, ptwrite, serialize, shstk, tsxldtrk, waitpkg.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D86503
The file was modifiedclang/test/Misc/target-invalid-cpu-note.c
The file was modifiedllvm/lib/Support/Host.cpp
The file was modifiedllvm/include/llvm/Support/X86TargetParser.def
The file was modifiedllvm/lib/Target/X86/X86.td
The file was modifiedllvm/include/llvm/Support/X86TargetParser.h
The file was modifiedclang/lib/Basic/Targets/X86.cpp
The file was modifiedclang/test/CodeGen/attr-target-mv.c
The file was modifiedllvm/lib/Support/X86TargetParser.cpp
The file was modifiedllvm/test/CodeGen/X86/cpus-intel.ll
The file was modifiedclang/test/Preprocessor/predefined-arch-macros.c
The file was modifiedclang/test/Driver/x86-march.c
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
The file was modifiedclang/test/CodeGen/target-builtin-noerror.c
Commit 04ba18563390ec87400fa068a9b4981b235ebaa6 by richard
PR37556: Don't diagnose conflicts between instantiated unqualified
friend declarations and declarations found in inline namespaces within
the target context.
The file was modifiedclang/test/SemaTemplate/friend.cpp
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
Commit 2501e911a5a174fc1a07a2a1ac687a2bf0f05ef3 by Raphael Isemann
[lldb] Don't depend on psutil in TestCompletion.py

psutil isn't reall a dependency of the test suite so this shouldn't be
unconditionally be imported here. Instead just check for the process name
by looking for the "a.out" string to get the bots green again.
The file was modifiedlldb/test/API/functionalities/completion/TestCompletion.py
Commit c655d8081570336dda109502ed1e7a2eff1b26e2 by ecaldas
[SyntaxTree] Extend the syntax tree dump to also cover `NodeRole`

We should see `NodeRole` information in the dump because that exposes how the
accessors will behave.

Functional changes in the dump:
* Surround Leaf tokens with `'`
* Append `Node` dumps with `NodeRole` information, except for unknown roles
* Append marks to `Node` dumps, instead of prepending

Non-functional changes:
* `::dumpTokens(llvm::raw_ostream, ArrayRef<syntax::Token>, const
SourceManager &SM)` always received as parameter a `syntax::Token *`
pointing to `Leaf::token()`. Changed the function to
`dumpLeaf(llvm::raw_ostream, syntax::Leaf *, const SourceManager&)`
* `dumpTree` acted on a Node, rename to `dumpNode`

Differential Revision: https://reviews.llvm.org/D85330
The file was modifiedclang/unittests/Tooling/Syntax/TreeTestBase.cpp
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
The file was modifiedclang/include/clang/Tooling/Syntax/Tree.h
Commit 02a9f8a27b7f22e4a499c5511142bd2650defad1 by ecaldas
[SyntaxTree] Update `Statement` tests to dump `NodeRole`
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
Commit 6118ce79a3d3832c8bcbd985fbd2bf0bee4ea8a2 by ecaldas
[SyntaxTree] Update `Expression` tests to dump `NodeRole`
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
Commit 5c11c08d86f3ae45ec3b2b2766c48a3dc572d05e by ecaldas
[SyntaxTree] Update `Declaration` tests to dump `NodeRole`
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
Commit be2bc7d4cef2edd66c7fb74b70adf62fc68754db by ecaldas
[SyntaxTree] Update `Modifiable` tests to dump `NodeRole` and `unmodifiable` tag
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
Commit 879c1db5d24dcb0ac03f9f6282a09996ff3dc291 by martin
[Compiler-RT] Fix profiler building with MinGW GCC

Differential Revision: https://reviews.llvm.org/D86405
The file was modifiedcompiler-rt/lib/profile/InstrProfilingPort.h
Commit e3585ff7af17acda65bbdac66530bbf5f67fdbca by ro
[compiler-rt][asan][test] Set LD_LIBRARY_PATH_{32,64} on Solaris

The dynamically linked ASan tests rely on `LD_LIBRARY_PATH` to find
`libclang_rt.asan-*.so` at runtime.

However, the Solaris runtime linker `ld.so.1` also supports more specific
variables: `LD_LIBRARY_PATH_32` and `LD_LIBRARY_PATH_64` respectively.  If
those happen to be set, `LD_LIBRARY_PATH` is ignored.  In such a case, all
dynamically linked ASan tests `FAIL`.  For i386 alone, this affects about
200 tests.

The following patch fixes that by also setting `LD_LIBRARY_PATH_{32,64}` on
Solaris.

Tested on `amd64-pc-solaris2.11` both with only `LD_LIBRARY_PATH` set and
with `LD_LIBRARY_PATH_{32,64}` set too.

Differential Revision: https://reviews.llvm.org/D86333
The file was modifiedcompiler-rt/test/asan/Unit/lit.site.cfg.py.in
The file was modifiedcompiler-rt/test/asan/lit.cfg.py
Commit 85a5c65f695deb13787889658cfcfbbfc1a42664 by sam.parker
[NFC][RDA] Add explicit def check

Explicitly check that there is a local def prior to the given
instruction in getReachingLocalMIDef instead of just relying on
a nullptr return from getInstFromId.
The file was modifiedllvm/lib/CodeGen/ReachingDefAnalysis.cpp
Commit cdd339c568fdd0fa2494745d0f661c4a0647c13c by lebedev.ri
[InstCombine] PHI-of-insertvalues -> insertvalue-of-PHI's

As per statistic, this happens pretty exceedingly rare,
but i have seen it in exactly the situations the
Phi-aware aggregate reconstruction would have handled,
eventually, and allowed invoke -> call fold later on.

So while this might be something that other fold
will have to learn about, i believe we should be
doing this transform in general.

Here, we are okay with adding two PHI's to get both the base aggregate,
and the inserted value. I'm not sure it makes much sense to restrict
it to a single phi (to just the inserted value?), because originally
we'd be receiving the final aggregate already..

llvm test-suite + RawSpeed:
```
| statistic name                             | baseline  | proposed  |    Δ |      % | \|%\| |
|--------------------------------------------|-----------|-----------|-----:|-------:|------:|
| instcombine.NumPHIsOfInsertValues          | 0         | 12        |  12  |  0.00% | 0.00% |
| asm-printer.EmittedInsts                   | 8926643   | 8926595   | -48  |  0.00% | 0.00% |
| instcombine.NumCombined                    | 3846614   | 3846640   |  26  |  0.00% | 0.00% |
| instcombine.NumConstProp                   | 24302     | 24293     |  -9  | -0.04% | 0.04% |
| instcombine.NumDeadInst                    | 1620140   | 1620112   | -28  |  0.00% | 0.00% |
| instcount.NumBrInst                        | 898466    | 898464    |  -2  |  0.00% | 0.00% |
| instcount.NumCallInst                      | 1760819   | 1760875   |  56  |  0.00% | 0.00% |
| instcount.NumExtractValueInst              | 45659     | 45649     | -10  | -0.02% | 0.02% |
| instcount.NumInsertValueInst               | 4991      | 4981      | -10  | -0.20% | 0.20% |
| instcount.NumIntToPtrInst                  | 27084     | 27087     |   3  |  0.01% | 0.01% |
| instcount.NumPHIInst                       | 371435    | 371429    |  -6  |  0.00% | 0.00% |
| instcount.NumStoreInst                     | 906011    | 906019    |   8  |  0.00% | 0.00% |
| instcount.TotalBlocks                      | 1105520   | 1105518   |  -2  |  0.00% | 0.00% |
| instcount.TotalInsts                       | 9795737   | 9795776   |  39  |  0.00% | 0.00% |
| simplifycfg.NumInvokes                     | 2784      | 2786      |   2  |  0.07% | 0.07% |
| simplifycfg.NumSimpl                       | 1001840   | 1001850   |  10  |  0.00% | 0.00% |
| simplifycfg.NumSinkCommonInstrs            | 15174     | 15170     |  -4  | -0.03% | 0.03% |
```

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D86306
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
The file was modifiedllvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll
The file was modifiedllvm/test/Transforms/InstCombine/phi-of-insertvalues.ll
Commit e19ef1aab524ef10a2d118adcd9f6fd6ca2d7ca9 by flo
[DSE,MemorySSA] Cache accesses with/without reachable read-clobbers.

Currently we repeatedly check the same uses for read clobbers in some
cases. We can avoid unnecessary checks by keeping track of the memory
accesses we already found read clobbers for. To do so, we just add
memory access causing read-clobbers to a set. Note that marking all
visited accesses as read-clobbers would be to pessimistic, as that might
include accesses not on any path to  the actual read clobber.

If we do not find any read-clobbers, we can add all visited instructions
to another set and use that to skip the same accesses in the next call.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D75025
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit 7b64765cd19a60d6d56106769d06cdff5b660479 by david.sherwood
[SVE] Fix TypeSize related warnings with IR truncates of scalable vectors

In getCastInstrCost when the instruction is a truncate we were relying
upon the implicit TypeSize -> uint64_t cast when asking if a given type
has the same size as a legal integer. I've changed the code to only
ask the question if the type is fixed length.

I have also changed InstCombinerImpl::SimplifyDemandedUseBits to bail
out for now if the type is a scalable vector.

I've added the following new tests:

  Analysis/CostModel/AArch64/sve-trunc.ll
  Transforms/InstCombine/AArch64/sve-trunc.ll

for both of these fixes.

Differential revision: https://reviews.llvm.org/D86432
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was addedllvm/test/Analysis/CostModel/AArch64/sve-trunc.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
The file was addedllvm/test/Transforms/InstCombine/AArch64/sve-trunc.ll