Changes

Summary

  1. [NFC][X86][LV][Costmodel] Add most basic test for masked interleaved load (details)
  2. Don't consider 'LinkageSpec' when calculating DeclContext 'Encloses' (details)
  3. [CodeGen][AArch64] Bail out in performConcatVectorsCombine for scalable vectors (details)
  4. [clang-format] regressed default behavior for operator parentheses (details)
  5. Reapply 'Implement target_clones multiversioning' (details)
  6. [mlir][memref] Fix bug in verification of memref.collapse_shape (details)
  7. [X86] Add vector test coverage for or with no common bits tests (details)
  8. [AMDGPU] Fix "must generated" typo in docs (details)
  9. [AMDGPU] Fix list indentation in docs (details)
  10. [AMDGPU][GlobalISel] Transform (fadd (fmul x, y), z) -> (fma x, y, z) (details)
  11. [AMDGPU][GlobalISel] Transform (fadd (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), z) (details)
  12. [AMDGPU][GlobalISel] Transform (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y, (fma u, v, z)) (details)
  13. [AMDGPU][GlobalISel] Transform (fadd (fma x, y, (fpext (fmul u, v))), z) -> (fma x, y, (fma (fpext u), (fpext v), z)) (details)
  14. [AMDGPU][GlobalISel] Transform (fsub (fmul x, y), z) -> (fma x, y, -z) (details)
  15. [AMDGPU][GlobalISel] Transform (fsub (fneg (fmul, x, y)), z) -> (fma (fneg x), y, (fneg z)) (details)
  16. [AMDGPU][GlobalISel] Transform (fsub (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), (fneg z)) (details)
  17. [AMDGPU][GlobalISel] Transform (fsub (fpext (fneg (fmul x, y))), z) -> (fneg (fma (fpext x), (fpext y), z)) (details)
  18. [X86][Costmodel] `getInterleavedMemoryOpCostAVX512()`: masked load can not be folded into a shuffle (details)
  19. [fir] Get rid of the global option in FIRBuilder (details)
  20. [HWASan] Disable LTO test on aarch64. (details)
  21. [SCEV] Remove incorrect assert (details)
  22. [InstCombine] Fold (~A | B) ^ A --> ~(A & B) (details)
Commit 5e96553608a1bbf688f11c76890dc543c5f89c61 by lebedev.ri
[NFC][X86][LV][Costmodel] Add most basic test for masked interleaved load
The file was addedllvm/test/Analysis/CostModel/X86/masked-interleaved-store-i16.ll
The file was addedllvm/test/Analysis/CostModel/X86/masked-interleaved-load-i16.ll
The file was removedllvm/test/Analysis/CostModel/X86/interleaved-store-accesses-with-gaps.ll
Commit 90010c2e1d60c6a9a4a0b30a113d4dae2b7214eb by erich.keane
Don't consider 'LinkageSpec' when calculating DeclContext 'Encloses'

We don't properly handle lookup through using directives when there is
a linkage spec in the common chain.  This is because `CppLookupName` and
`CppNamespaceLookup` end up skipping `LinkageSpec`'s (correctly, as they
are not lookup scopes), but the `UnqualUsingDirectiveSet` does not.

I discovered that when we are calculating the `CommonAncestor` for a
using-directive, we were coming up with the `LinkageSpec`, instead of
the `LinkageSpec`'s parent.  Then, when we use
`UnqualUsingDirectiveSet::getNamespacesFor` a scope, we don't end up
finding any that were in the `LinkageSpec` (again, since `CppLookupName`
skips linkage specs), so those don't end up participating in the lookup.

The function `UnqualUsingDirectiveSet::addUsingDirective` calculates
this common ancestor via a loop through the the `DeclSpec::Encloses`
function.

Changing this Encloses function to believe that a `LinkageSpec`
`Encloses` nothing ends up fixing the problem without breaking any other tests,
so I opted to do that.  A less aggressive patch could perhaps change only
the `addUsingDirective`, but my examination of all uses of `Encloses`
showed that it seems to be used exclusively in lookup, which makes me think
this is correct everywhere.

Differential Revision: https://reviews.llvm.org/D113709
The file was modifiedclang/lib/AST/DeclBase.cpp
The file was addedclang/test/SemaCXX/lookup-through-linkage.cpp
Commit 84364bdaabfca35f083c932ffd3a14f3b9ad4f3a by david.sherwood
[CodeGen][AArch64] Bail out in performConcatVectorsCombine for scalable vectors

I tried to exercise the existing combine patterns in performConcatVectorsCombine
for scalable vectors and at the moment it doesn't seem possible. Parts of
the code currently assume we're dealing with fixed-width vectors with calls
to getVectorNumElements(), therefore I've decided to simply bail out early
for scalable vectors.

Added a test here to show that we don't crash when attempting to combine
truncate + concat:

  CodeGen/AArch64/concat_vector-truncate-combine.ll

Differential Revision: https://reviews.llvm.org/D114600
The file was modifiedllvm/test/CodeGen/AArch64/concat_vector-truncate-combine.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit 814aabae37757d21d96e22608ccb98e91c1f3a06 by mydeveloperday
[clang-format] regressed default behavior for operator parentheses

{D110833} regressed behavior of spaces before parentheses for operators, this revision reverts that so that operators are handled as they were before.

I think in hindsight it was a mistake to try and consume operator behaviour in with the function behaviour, I think Operators can be considered a special style. Its seems the code is getting confused as to if this is a function declaration or definition.

I think latterly we can consider adding an operator parentheses specific custom option but this should have been explicitly called out as it can impact projects.

Reviewed By: HazardyKnusperkeks, curdeius

Differential Revision: https://reviews.llvm.org/D114696
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
Commit fc53eb69c26cdd7efa6b629c187d04326f0448ca by erich.keane
Reapply 'Implement target_clones multiversioning'

See discussion in D51650, this change was a little aggressive in an
error while doing a 'while we were here', so this removes that error
condition, as it is apparently useful.

This reverts commit bb4934601d731465e01e2e22c80ce2dbe687d73f.
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was addedclang/test/Sema/attr-target-clones.c
The file was modifiedclang/test/Sema/attr-cpuspecific.c
The file was modifiedclang/include/clang/AST/Decl.h
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/include/clang/Basic/Attr.td
The file was addedclang/test/CodeGen/attr-target-clones.c
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was addedclang/test/CodeGenCXX/attr-target-clones.cpp
The file was modifiedclang/test/Misc/pragma-attribute-supported-attributes-list.test
The file was modifiedclang/lib/AST/Decl.cpp
The file was addedclang/test/SemaCXX/attr-target-clones.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
Commit 95f34e318c469806879a0cd1a6c5290901ed12df by herhut
[mlir][memref] Fix bug in verification of memref.collapse_shape

The verifier computed an illegal type with negative dimension size when collapsing partially static memrefs.

Differential Revision: https://reviews.llvm.org/D114702
The file was modifiedmlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
The file was modifiedmlir/test/Dialect/MemRef/ops.mlir
Commit a7363067e69a60442a1d52e93207ed7a86ce9d6a by spatel
[X86] Add vector test coverage for or with no common bits tests

Ensure D113970 handles vector types patterns as well.

Differential Revision: https://reviews.llvm.org/D114575
The file was addedllvm/test/CodeGen/X86/vec_no-common-bits.ll
Commit 7319d11586c4aa836204316a5be7cd71cfe5e05d by jay.foad
[AMDGPU] Fix "must generated" typo in docs
The file was modifiedllvm/docs/AMDGPUUsage.rst
Commit 65d9dc7f1f4ac5b4d76502d36bd81d9857538148 by jay.foad
[AMDGPU] Fix list indentation in docs
The file was modifiedllvm/docs/AMDGPUUsage.rst
Commit 881840fc268e6523b71b40e717c647ed45682816 by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fadd (fmul x, y), z) -> (fma x, y, z)

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D93305
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-mul.ll
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-mul-pre-legalize.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-mul-post-legalize.mir
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.h
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
Commit 89511362165332695bf0e26767662b47f8e11f98 by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fadd (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), z)

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D97937
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.h
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-ext-mul.ll
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
Commit f7322925365c165e8e92a699a2a699b6fe04f6d5 by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y, (fma u, v, z))

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D97938
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-fma-mul.ll
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
Commit e5e49a08f11618653aca133f22603c165889505e by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fadd (fma x, y, (fpext (fmul u, v))), z) -> (fma x, y, (fma (fpext u), (fpext v), z))

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D98047
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-ext-fma.ll
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit a7821692708c413d7a2488137dea2fbbfac31ca7 by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fsub (fmul x, y), z) -> (fma x, y, -z)

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D96614
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-sub-mul.ll
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
Commit 5fe7fcd28e5e7df174a46a78e19316856152eefa by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fsub (fneg (fmul, x, y)), z) -> (fma (fneg x), y, (fneg z))

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D98048
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-sub-neg-mul.ll
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit 37c2a2201d683383d3683321ff1f33fd8dd22298 by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fsub (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), (fneg z))

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D98049
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-sub-ext-mul.ll
Commit 0dd570ff56c53dd6d11305fb0b36edab69eb1484 by Mirko.Brkusanin
[AMDGPU][GlobalISel] Transform (fsub (fpext (fneg (fmul x, y))), z) -> (fneg (fma (fpext x), (fpext y), z))

Patch by: Mateja Marjanovic

Differential Revision: https://reviews.llvm.org/D98050
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-sub-ext-neg-mul.ll
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit 7e73c2a66a8bb73b80aedc94c4e58598ac87e9d5 by lebedev.ri
[X86][Costmodel] `getInterleavedMemoryOpCostAVX512()`: masked load can not be folded into a shuffle

The mask on the shuffle is for the output, not the input.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D114697
The file was modifiedllvm/test/Analysis/CostModel/X86/masked-interleaved-load-i16.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
Commit 1cc3b135aa61a31a7f7e488dd720e29bd8907bfc by clementval
[fir] Get rid of the global option in FIRBuilder

Replace the global option `nameLengthHashSize` with a constexpr
with the same name. The option was not used in fir-dev so switching
to a constexpr is fine.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D114630
The file was modifiedflang/lib/Optimizer/Builder/FIRBuilder.cpp
Commit 2022e2fcd05c68a38c4b5ef865461c9c86a81997 by mascasa
[HWASan] Disable LTO test on aarch64.

It fails for non-Android aarch64 bots as well.
The file was modifiedcompiler-rt/test/hwasan/TestCases/lto.c
Commit 77dd579827f2e7574be4bbf3f94a48930e7b094f by nikita.ppv
[SCEV] Remove incorrect assert

Fix assertion failure reported on D113349 by removing the assert.
While the produced expression should be equivalent, it may not
be strictly the same, e.g. due to lazy nowrap flag updates. Similar
to what the main createSCEV() code does, simply retain the old
value map entry if one already exists.
The file was addedllvm/test/Analysis/ScalarEvolution/addrec-computed-during-addrec-calculation.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit c572eb1ad9d8a528bcaff0160888aff31b1f4b5f by mehrnoosh.heidarpour
[InstCombine] Fold (~A | B) ^ A --> ~(A & B)

https://alive2.llvm.org/ce/z/gLrYPk

Fixes:
https://llvm.org/PR52518

Reviewed by: spatel

Differential revision: https://reviews.llvm.org/D114339
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modifiedllvm/test/Transforms/InstCombine/xor.ll

Summary

  1. Remove `nm` dependency, used `objdump –t` instead. (details)
  2. Copy lnt_graph.js as lnt_regression.js and use it in v4_new_regressions.html and v4_regression_detail.html (details)
  3. Update graph API to return the original string revision as X values (details)
Commit 94d5d9d534c9c0d0496574c0647d23dbc2bfb310 by kosov.pavel
Remove `nm` dependency, used `objdump –t` instead.

It is necessary to use the correct nm and objdump for some targets (for example ARM thumb).
Wrong nm can provide an information but addresses may be wrong. The correct nm for ARM will report the address 0x1234 for a thumb binary, but system’s nm (x86) will report the address 0x1235.
It is very hard to investigate such issues. We suggest to remove nm dependency at all and use objdump -t instead.
Note objdump allows demangling too. It makes the profile page more human friendly.
Here is the objdump -t output format for reference https://github.com/llvm-mirror/llvm/blob/2c4ca6832fa6b306ee6a7010bfb80a3f2596f824/tools/llvm-objdump/llvm-objdump.cpp#L1850

OS Laboratory. Huawei Russian Research Institute. Saint-Petersburg

Reviewed By: tnfchris

Differential Revision: https://reviews.llvm.org/D114641
The file was modifiedlnt/server/ui/profile_views.py (diff)
The file was modifiedlnt/testing/profile/perf.py (diff)
The file was modifiedlnt/testing/profile/profile.py (diff)
The file was modifiedlnt/testing/profile/cPerf.cpp (diff)
The file was modifiedlnt/server/ui/static/lnt_profile.js (diff)
Commit 3a546ee6337656bc4701883e5427cd9dc0f40dbd by kosov.pavel
Copy lnt_graph.js as lnt_regression.js and use it in v4_new_regressions.html and v4_regression_detail.html

This preparation will allow to refactor the graph page to use the library plotly with minimal changes.

OS Laboratory. Huawei Russian Research Institute. Saint-Petersburg

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D114332
The file was modifiedlnt/server/ui/templates/v4_new_regressions.html (diff)
The file was addedlnt/server/ui/static/lnt_regression.js
The file was modifiedlnt/server/ui/templates/v4_regression_detail.html (diff)
Commit 66b46df62ca7e1f72c71c0cef689a992b5d478fd by kosov.pavel
Update graph API to return the original string revision as X values

api/db_default/v4/nts/graph is used to request regression points on fly using JS.
We still use convert_revision() for sorting, but return the original (unchanged) values.
It must be done before refactoring to use the library plotly.

OS Laboratory. Huawei Russian Research Institute. Saint-Petersburg

Reviewed By: cmatthews

Differential Revision: https://reviews.llvm.org/D114333
The file was modifiedlnt/server/ui/api.py (diff)
The file was modifiedtests/server/ui/test_api.py (diff)
The file was modifiedlnt/server/ui/templates/v4_regression_detail.html (diff)
The file was modifiedlnt/server/ui/templates/v4_new_regressions.html (diff)