SuccessChanges

Summary

  1. ASTConcept.h - remove unused <string> include. NFCI. (details)
  2. [PhaseOrdering] Update tests after 23c2f2e6b24d. (details)
  3. [NFC] Fix semantic discrepancy for MVT::LAST_VALUETYPE (details)
  4. [clang] NFC: test for undefined behaviour in RawComment::getFormattedText() (details)
  5. [lld/mac] Implement support for searching dylibs with @rpath/ in install name (details)
  6. [llvm] Add interface to order inlining (details)
  7. [OpenCL] Add const attribute to ctz() builtins (details)
  8. [AMDGPU][Libomptarget] Remove atlc global (details)
  9. [mlir] Add offset/stride helper functions to OffsetSizeAndStrideOpInterface (details)
  10. [Matrix] Add -matrix-allow-contract=false to tests. (details)
  11. [LV] Update more target-specific tests after 23c2f2e6b24d. (details)
  12. [mlir][linalg] Add padding helper functions to PadTensorOp (details)
  13. [AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics (details)
  14. [clangd] Drop TestTUs dependency on gtest (details)
  15. [gn build] fix syntax error from 50bb1b930dbc (details)
  16. ExternalASTSource.h - remove unused StringRef and <string> includes. NFCI. (details)
  17. [clang] Fix a crash during code completion (details)
  18. [MLIR][SPIRV] Use getAsmResultName(...) hook for AddressOfOp. (details)
  19. [InstCombine] Missed optimization for pow(x, y) * pow(x, z) with fast-math (details)
  20. [AMDGPU] Increase alignment of LDS globals if necessary before LDS lowering. (details)
Commit 30a89a754af00004a7bc8afd485021f9e68d5d70 by llvm-dev
ASTConcept.h - remove unused <string> include. NFCI.
The file was modifiedclang/include/clang/AST/ASTConcept.h
Commit 131343d35bf2ce55001fdd9c4cdf2965b56f26d8 by flo
[PhaseOrdering] Update tests after 23c2f2e6b24d.
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/peel-before-lv-to-enable-vectorization.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/pixel-splat.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/AArch64/hoisting-sinking-required-for-vectorization.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vdiv-nounroll.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vdiv.ll
Commit 1da2c7d25c0926b1ebac5855ab099b004b6a827a by gchatelet
[NFC] Fix semantic discrepancy for MVT::LAST_VALUETYPE

Differential Revision: https://reviews.llvm.org/D103251
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
Commit aa0d7179bbb3fd24bc9eb1fd6203565dbd50e8d8 by dmitry.polukhin
[clang] NFC: test for undefined behaviour in RawComment::getFormattedText()

This diff adds testcase for the issue fixed in https://reviews.llvm.org/D77468
but regression test was not added in the diff. On Clang 9 it caused
crash in cland during code completion.

Test Plan: check-clang-unit

Differential Revision: https://reviews.llvm.org/D103722
The file was modifiedclang/unittests/AST/CommentTextTest.cpp
Commit c5ffe9798850a699c2229899712ca9d153f2a4b8 by thakis
[lld/mac] Implement support for searching dylibs with @rpath/ in install name

Also adjust a few comments, and move the DylibFile comment talking about
umbrella next to the parameter again.

Differential Revision: https://reviews.llvm.org/D103783
The file was addedlld/test/MachO/link-search-at-rpath.s
The file was modifiedlld/MachO/InputFiles.h
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/test/MachO/rpath.s
The file was modifiedlld/MachO/DriverUtils.cpp
Commit 4a0de622c34e0cb86b22a8e5f38dfd388e07e2fc by taolq
[llvm] Add interface to order inlining

This patch abstract Calls in Inliner:run() to InlineOrder.
With this patch, it's possible to customize the inlining order,
e.g. use queue or priority queue.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D103315
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
Commit 9b14670f3ca287ce949c4157e0f673c84da255a3 by stuart.brady
[OpenCL] Add const attribute to ctz() builtins

Reviewed By: svenvh

Differential Revision: https://reviews.llvm.org/D97725
The file was modifiedclang/lib/Headers/opencl-c.h
The file was modifiedclang/lib/Sema/OpenCLBuiltins.td
Commit 4f8bc7caf4e5fcc1620b3fd4980ec8d671e9345b by Pushpinder.Singh
[AMDGPU][Libomptarget] Remove atlc global

This global struct used to hold various flags for monitoring the
initialization of hsa.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D103795
The file was modifiedopenmp/libomptarget/plugins/amdgpu/impl/internal.h
The file was modifiedopenmp/libomptarget/plugins/amdgpu/impl/system.cpp
Commit 6e7bbdd6e7f7649bccc4f981520ed916e21d7058 by springerm
[mlir] Add offset/stride helper functions to OffsetSizeAndStrideOpInterface

* Add hasUnitStride and hasZeroOffset to OffsetSizeAndStrideOpInterface. These functions are useful for various patterns. E.g., some vectorization patterns apply only for tensor ops with zero offsets and/or unit stride.
* Add getConstantIntValue and isEqualConstantInt helper functions, which are useful for implementing the two above functions, as well as various patterns.

Differential Revision: https://reviews.llvm.org/D103763
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.h
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/include/mlir/Interfaces/ViewLikeInterface.td
The file was modifiedmlir/include/mlir/Interfaces/ViewLikeInterface.h
Commit 87c99d2b970be7c16ab0382c6c59e4d3abbf4a48 by flo
[Matrix] Add -matrix-allow-contract=false to tests.

Explicitly specify contract behavior, so the tests are independent of
the current default of the flag.
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/preserve-existing-fast-math-flags.ll
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/propagate-multiple-iterations.ll
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/const-gep.ll
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/propagate-forward.ll
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/propagate-backward.ll
Commit 8344e215ec6caac4b3372d6e96333b35ab1d8741 by flo
[LV] Update more target-specific tests after 23c2f2e6b24d.
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/optimal-epilog-vectorization.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/vectorize-bswap.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/widened-massv-call.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/widened-massv-vfabi-attr.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/RISCV/masked_gather_scatter.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/AMDGPU/packed-math.ll
Commit fe0befb123e4a727c3c883845c9d3bfe75d831c7 by springerm
[mlir][linalg] Add padding helper functions to PadTensorOp

Add helper functions to quickly check for zero low/high padding.

Differential Revision: https://reviews.llvm.org/D103781
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
Commit 60c9b5f35caeb555f66d261bf5a657ab02a35fef by bradley.smith
[AArch64][SVE] Improve codegen for dupq SVE ACLE intrinsics

Use llvm.experimental.vector.insert instead of storing into an alloca
when generating code for these intrinsics. This defers the codegen of
the generated vector to instruction selection, allowing existing
shufflevector style optimizations to apply.

Additionally, introduce a new target transform that can recognise fixed
predicate patterns in the svbool variants of these intrinsics.

Differential Revision: https://reviews.llvm.org/D103082
The file was addedllvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-opts-cmpne.ll
The file was modifiedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq.c
The file was modifiedllvm/include/llvm/IR/IntrinsicsAArch64.td
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was addedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq_const.c
The file was modifiedclang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_dupq-bfloat.c
Commit 4728aca9a8adadc34590e3c930dcf8a32593d846 by kadircet
[clangd] Drop TestTUs dependency on gtest

TestTU now prints errors to llvm::errs and aborts on failures via
llvm_unreachable, rather than executing ASSERT_FALSE.

We'd like to make use of these testing libraries in different test suits that
might be compiling with a different gtest version than LLVM has.

Differential Revision: https://reviews.llvm.org/D103685
The file was modifiedclang-tools-extra/clangd/index/Symbol.cpp
The file was modifiedclang-tools-extra/clangd/index/Symbol.h
The file was modifiedclang-tools-extra/clangd/unittests/TestTU.cpp
Commit cf29cdccbbaa611ef2393be9f07d9fbc1e61037a by thakis
[gn build] fix syntax error from 50bb1b930dbc
The file was modifiedllvm/utils/gn/secondary/llvm/lib/ObjectYAML/BUILD.gn
Commit 8b58092de49b8be964e760c161585665e8d8c48f by llvm-dev
ExternalASTSource.h - remove unused StringRef and <string> includes. NFCI.
The file was modifiedclang/include/clang/AST/ExternalASTSource.h
Commit 721476e6b2119a93033903109b54f429b6e8c91b by adamcz
[clang] Fix a crash during code completion

During code completion, lookupInDeclContext() calls
CodeCompletionDeclConsumer::FoundDecl(),which can mutate StoredDeclsMap,
over which lookupInDeclContext() iterates. This can lead to invalidation
of iterators and an assert()-crash.

Example code where this happens:
#include <list>
int main() {
   std::list<int>;
   std::^
}
with code completion on ^ with -std=c++20.

I do not have a repro case that does not need standard library.

This fix stores pointers to NamedDecls in a temporary vector, then
visits them outside of the main loop, when StoredDeclsMap iterators are
gone.

Differential Revision: https://reviews.llvm.org/D103472
The file was modifiedclang/lib/Sema/SemaLookup.cpp
Commit 2def12ebc6cc904cddb4bc608df63014ec2bfe86 by kareem.ergawy
[MLIR][SPIRV] Use getAsmResultName(...) hook for AddressOfOp.

Implements better naming for results of spv.mlir.addressof ops by making it
inherit from OpAsmOpInterface and implementing the associated
getAsmResultName(...) hook.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D103594
The file was modifiedmlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/IR/asm-op-interface.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
Commit 7736c1936a93d7effecf32ef5193dfc00b732cd2 by spatel
[InstCombine] Missed optimization for pow(x, y) * pow(x, z) with fast-math

If FP reassociation (fast-math) is allowed, then LLVM is free to do the
following transformation pow(x, y) * pow(x, z) -> pow(x, y + z).
This patch adds this transformation and tests for it.
See more https://bugs.llvm.org/show_bug.cgi?id=47205

It handles two cases

1. When operands of fmul are different instructions

%4 = call reassoc float @llvm.pow.f32(float %0, float %1)
%5 = call reassoc float @llvm.pow.f32(float %0, float %2)
%6 = fmul reassoc float %5, %4
-->
%3 = fadd reassoc float %1, %2
%4 = call reassoc float @llvm.pow.f32(float %0, float %3)

2. When operands of fmul are the same instruction

%4 = call reassoc float @llvm.pow.f32(float %0, float %1)
%5 = fmul reassoc float %4, %4
-->
%3 = fadd reassoc float %1, %1
%4 = call reassoc float @llvm.pow.f32(float %0, float %3)

Differential Revision: https://reviews.llvm.org/D102574
The file was modifiedllvm/test/Transforms/InstCombine/fmul-pow.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
Commit 52ffbfdffc240085fc6ac39cff2f98e66458171f by mahesha.comp
[AMDGPU] Increase alignment of LDS globals if necessary before LDS lowering.

Before packing LDS globals into a sorted structure, make sure that
their alignment is properly updated based on their size. This will make
sure that the members of sorted structure are properly aligned, and
hence it will further reduce the probability of unaligned LDS access.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D103261
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/lds-global-value.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_read2_offset_order.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-alignment.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_read2.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-alloca-globals.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_write2.ll
The file was addedllvm/test/CodeGen/AMDGPU/update-lds-alignment.ll