FailedChanges

Summary

  1. Revert rGe55410f8b260 : "AArch64/GlobalISel: Add testcase for bug 47619" (details)
  2. [SplitKit] In addDeadDef tolerate parent range that defines more lanes (details)
  3. [AMDGPU] Fix declaration parameter names to match definition (details)
  4. [AArch64] PAC/BTI code generation for LLVM generated functions (details)
  5. [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers (details)
  6. [CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool (details)
  7. [PowerPC][LLD] Extend R2 save stub to support offsets of more than 26 bits (details)
  8. [InstCombine] Add bswap tests from funnel shift intrinsics (details)
  9. [PPC] [AIX] Implement calling convention IR for C99 complex types on AIX (details)
  10. [mlir] [VectorOps] generalize printing support for integers (details)
  11. [clang-format] Add a MacroExpander. (details)
  12. [Analyzer] Fix unused variable warning in Release builds (details)
  13. [gn build] Port e336b74c995 (details)
  14. [SCEV] Add more tests using info from loop guards for BTC. (details)
  15. [libc++] Initial support for pre-commit CI with Buildkite (details)
  16. [SCEV] Extract code to collect conditions to lambda (NFC). (details)
  17. Typo fix; NFC (details)
  18. [InstCombine] Add 'partial' bswap tests from PR39793 (details)
  19. Fix some of the more egregious 80-col and whitespace issues; NFC (details)
  20. [InstCombine] Add some extra bswap tests from PR39793 (details)
  21. [PowerPC][NFC] Merged two switch entries. (details)
  22. [SCEV] Swap operands if LHS is not unknown. (details)
  23. [AIX] Try to not use LLVM tools while building runtimes (details)
  24. [SVE] Lower fixed length VECREDUCE_[SMAX|SMIN] to Scalable (details)
  25. [SVE] Revert accidental change from 405e22fbe8719cff6c40eec15c2044f42527f116 (details)
  26. Add a verifier check that rejects non-distinct DISubprogram function (details)
  27. [NFC] Fix minor typos in comments and reuse concreteOp. (details)
  28. [NFC] Fix syntax of ranked memrefs in the MLIR Language Reference. (details)
  29. [libc++][ci] Don't require passing --token to phabricator-report (details)
  30. [CMake] Make sure _cmake_system_name has a default (details)
  31. [SystemZ] Optimize bcmp calls (PR47420) (details)
  32. [SCEV] Add support for `x == constant` to CollectCondition. (details)
Commit 42bfa7c63b85e76fe16521d1671afcafaf8f64ed by llvm-dev
Revert rGe55410f8b260 : "AArch64/GlobalISel: Add testcase for bug 47619"

This reverts commit e55410f8b260a2868d600ca99fe5ee80f9cd4fc5.

This is failing on EXPENSIVE_CHECKS buildbots
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/irtranslator-stack-evt-bug47619.ll
Commit b34ddfcc76e39cdad62887f648aec46c8434c648 by jay.foad
[SplitKit] In addDeadDef tolerate parent range that defines more lanes

Following on from D87757 "[SplitKit] Only copy live lanes", in
SplitEditor::addDeadDef, when we're checking whether the parent live
interval has a subrange defining the same lanes, tolerate the case
where the parent subrange defines a superset of the lanes. This can
happen when the child subrange comes from SplitEditor::buildCopy
decomposing a partial copy into a sequence of subreg copies that cover
the required lanes.

Differential Revision: https://reviews.llvm.org/D88020
The file was modifiedllvm/lib/CodeGen/SplitKit.h (diff)
The file was modifiedllvm/lib/CodeGen/SplitKit.cpp (diff)
The file was addedllvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
Commit f11f382523e096859571b61520af81b9bb1defbf by jay.foad
[AMDGPU] Fix declaration parameter names to match definition

This fixes the declaration of AMDGPULegalizerInfo::legalizeBufferLoad to
match the definition. It is still confusing that that parameter order is
different from legalizeBufferStore.

https://bugs.llvm.org/show_bug.cgi?id=47535
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h (diff)
Commit a88c722e687e6780dcd6a58718350dc76fcc4cc9 by momchil.velikov
[AArch64] PAC/BTI code generation for LLVM generated functions

PAC/BTI-related codegen in the AArch64 backend is controlled by a set
of LLVM IR function attributes, added to the function by Clang, based
on command-line options and GCC-style function attributes. However,
functions, generated in the LLVM middle end (for example,
asan.module.ctor or __llvm_gcov_write_out) do not get any attributes
and the backend incorrectly does not do any PAC/BTI code generation.

This patch record the default state of PAC/BTI codegen in a set of
LLVM IR module-level attributes, based on command-line options:

* "sign-return-address", with non-zero value means generate code to
  sign return addresses (PAC-RET), zero value means disable PAC-RET.

* "sign-return-address-all", with non-zero value means enable PAC-RET
  for all functions, zero value means enable PAC-RET only for
  functions, which spill LR.

* "sign-return-address-with-bkey", with non-zero value means use B-key
  for signing, zero value mean use A-key.

This set of attributes are always added for AArch64 targets (as
opposed, for example, to interpreting a missing attribute as having a
value 0) in order to be able to check for conflicts when combining
module attributed during LTO.

Module-level attributes are overridden by function level attributes.
All the decision making about whether to not to generate PAC and/or
BTI code is factored out into AArch64FunctionInfo, there shouldn't be
any places left, other than AArch64FunctionInfo, which directly
examine PAC/BTI attributes, except AArch64AsmPrinter.cpp, which
is/will-be handled by a separate patch.

Differential Revision: https://reviews.llvm.org/D85649
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-0.ll (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/branch-target-enforcement-indirect-calls.ll (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td (diff)
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-8.ll (diff)
The file was removedclang/test/CodeGenCXX/aarch64-sign-return-address-static-ctor.cpp
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-4.ll (diff)
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-2fixup-blr-terminator.mir (diff)
The file was modifiedllvm/test/CodeGen/AArch64/branch-target-enforcement.mir (diff)
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-5.ll (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/bti-branch-relaxation.ll (diff)
The file was modifiedclang/lib/CodeGen/CGDeclCXX.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-3.ll (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64BranchTargets.cpp (diff)
The file was addedllvm/test/CodeGen/AArch64/pacbti-llvm-generated-funcs-1.ll
The file was modifiedclang/test/CodeGen/aarch64-sign-return-address.c (diff)
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-outline-bti.ll (diff)
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-1.ll (diff)
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-bti.mir (diff)
The file was modifiedclang/test/CodeGen/aarch64-branch-protection-attr.c (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp (diff)
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-7.ll (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/patchable-function-entry-bti.ll (diff)
The file was addedllvm/test/CodeGen/AArch64/pacbti-llvm-generated-funcs-2.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h (diff)
The file was addedllvm/test/CodeGen/AArch64/pacbti-module-attrs.ll
Commit facad21b29839a08fdf448eb4dd5a4e31e293b9b by adam.balogh
[Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers

For /C++/ constructor initializers `ExprEngine:computeUnderConstruction()`
asserts that they are all member initializers. This is not neccessarily
true when this function is used to get the return value for the
construction context thus attempts to fetch return values of base and
delegating constructor initializers result in assertions. This small
patch fixes this issue.

Differential Revision: https://reviews.llvm.org/D85351
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp (diff)
The file was modifiedclang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp (diff)
Commit 9d2ef5e74eea2247657431f44152f1f83ed99b84 by whisperity
[CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool

Create targets `check-clang-extra-clang-tidy`, `check-clang-extra-clang-query`
similar to how `check-clang-sema`, `check-clang-parser`, etc. are
auto-generated from the directory structure.

This allows running only a particular sub-tool's tests, not having to wait
through the entire `check-clang-tools` execution.

Differential Revision: http://reviews.llvm.org/D84176
The file was modifiedclang-tools-extra/test/CMakeLists.txt (diff)
Commit d224175230d1ab232cfdf71f9da63a732f405c91 by stefanp
[PowerPC][LLD] Extend R2 save stub to support offsets of more than 26 bits

The R2 save stub will now support offsets up to 64 bits.

There are three cases that will be used.
1) The offset fits in 26 bits.
```
b <26 bit offset>
```
2) The offset does not fit in 26 bits but fits in 34 bits.
```
paddi r12, 0, <34 bit offset>, 1
mtctr r12
bctr
```
3) The offset does not fit in 34 bits. Since this is an R2 save stub we can use
the TOC in R2. We are not loading the offset but the actual address we want to
branch to.
```
addis r12, r2, <address in TOC lo>
ld r12 <address in TOC hi>(r12)
mtctr r12
bctr
```

In case 1) the stub is only 8 bytes while in cases 2) and 3) the stub will be
20 bytes.

Reviewed By: MaskRay, sfertile, NeHuang

Differential Revision: https://reviews.llvm.org/D87916
The file was modifiedlld/ELF/Thunks.cpp (diff)
The file was modifiedlld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s (diff)
Commit 852447650c75de5f3e9c53a2659589cd2fd36b4d by llvm-dev
[InstCombine] Add bswap tests from funnel shift intrinsics

Based on (WIP) patch in D87452 - I'm intending to add the intrinsics handling to collectBitParts as a separate patch to make the changes clearer.
The file was modifiedllvm/test/Transforms/InstCombine/bswap.ll (diff)
Commit f330d9f163f644b968c6aa5884dc1be5efda20a1 by zarko
[PPC] [AIX] Implement calling convention IR for C99 complex types on AIX

Add AIX calling convention logic to Clang for C99 complex types on AIX

Differential Revision: https://reviews.llvm.org/D88130
The file was removedclang/test/CodeGen/aix-complex.c
The file was modifiedclang/test/CodeGen/powerpc-c99complex.c (diff)
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp (diff)
Commit b8880f5f97bf1628b2c9606e96abcd612dc7d747 by ajcbik
[mlir] [VectorOps] generalize printing support for integers

This generalizes printing beyond just i1,i32,i64 and also accounts
for signed and unsigned interpretation in the output.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D88290
The file was modifiedmlir/lib/ExecutionEngine/CRunnerUtils.cpp (diff)
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-print-int.mlir
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp (diff)
The file was modifiedmlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir (diff)
Commit e336b74c995d665bc3fb75164375bbb0f78f516c by klimek
[clang-format] Add a MacroExpander.

Summary:
The MacroExpander allows to expand simple (non-resursive) macro
definitions from a macro identifier token and macro arguments. It
annotates the tokens with a newly introduced MacroContext that keeps
track of the role a token played in expanding the macro in order to
be able to reconstruct the macro expansion from an expanded (formatted)
token stream.

Made Token explicitly copy-able to enable copying tokens from the parsed
macro definition.

Reviewers: sammccall

Subscribers: mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83296
The file was addedclang/lib/Format/Macros.h
The file was addedclang/unittests/Format/MacroExpanderTest.cpp
The file was modifiedclang/lib/Format/FormatToken.h (diff)
The file was addedclang/lib/Format/MacroExpander.cpp
The file was addedclang/unittests/Format/TestLexer.h
The file was modifiedclang/lib/Format/CMakeLists.txt (diff)
The file was modifiedclang/unittests/Format/CMakeLists.txt (diff)
Commit 6a1bca8798c6ba119f188061472b60876495b9ae by benny.kra
[Analyzer] Fix unused variable warning in Release builds

clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:377:19: warning: unused variable 'Init'
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp (diff)
Commit 9112567bbd1f479599e389ef9f45f820a1eab59c by llvmgnsyncbot
[gn build] Port e336b74c995
The file was modifiedllvm/utils/gn/secondary/clang/unittests/Format/BUILD.gn (diff)
The file was modifiedllvm/utils/gn/secondary/clang/lib/Format/BUILD.gn (diff)
Commit 1fa06162c1cf648a6d4fac837e02b709a205f4df by flo
[SCEV] Add more tests using info from loop guards for BTC.
The file was modifiedllvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll (diff)
Commit 9f21d341e83842c20f0cd09bb6b97617441ef55a by Louis Dionne
[libc++] Initial support for pre-commit CI with Buildkite

This commit adds basic files and scripts that are used for the Buildkite
pre-commit CI setup. This was tested to mostly work on a fork of llvm-project,
however some adjustments will have to be made as we complete the real
setup.
The file was addedlibcxx/utils/ci/phabricator-report
The file was addedlibcxx/utils/ci/secrets.env
The file was addedlibcxx/utils/ci/Dockerfile
The file was addedlibcxx/utils/ci/run-buildbot.sh
The file was addedlibcxx/utils/ci/buildkite-pipeline.yml
Commit df77ce7cad081bf55042cf098b61b118dcdfc7e9 by flo
[SCEV] Extract code to collect conditions to lambda (NFC).

This makes re-using the common functionality easier in follow-up
patches.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp (diff)
The file was modifiedclang/include/clang/Basic/AttrDocs.td (diff)
Commit 8d90d92f0dccfb9e1c150247128a28ed55fcb8ea by llvm-dev
[InstCombine] Add 'partial' bswap tests from PR39793

Tests for basic zext(bswap(trunc(x))) patterns shown on PR39793
The file was modifiedllvm/test/Transforms/InstCombine/bswap.ll (diff)
Commit a51d51a0d4d72ab423b11da4c5c877bc6e89a580 by aaron
Fix some of the more egregious 80-col and whitespace issues; NFC
The file was modifiedclang/include/clang/Basic/AttrDocs.td (diff)
Commit 132f29ce0611754e0ffb2b534c34b2ffe27b40a8 by llvm-dev
[InstCombine] Add some extra bswap tests from PR39793

Also test for cases where recognizeBSwapOrBitReverseIdiom checks for a truncated bswap pattern.
The file was modifiedllvm/test/Transforms/InstCombine/bswap.ll (diff)
Commit 8c53282d64b299a9543758988b1b480a88a93ae5 by stefanp
[PowerPC][NFC] Merged two switch entries.

Two switch entries did exactly the same thing. This patch merges them.
The file was modifiedlld/ELF/Arch/PPC64.cpp (diff)
Commit 8858340bd380b821bbad773c7b3a022a9bb5b2d9 by flo
[SCEV] Swap operands if LHS is not unknown.

Currently we only use information from guards for unknown expressions.
Swap LHS/RHS and predicate, if LHS is not unknown.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp (diff)
The file was modifiedllvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll (diff)
Commit e03dd978d015f6141d14afb3986f39365cabcdab by daltenty
[AIX] Try to not use LLVM tools while building runtimes

Since 64-bit XCOFF and the big AR format is not yet supported in some of these tools, this patch avoids additional setup of these tools. This patch is not intended to prevent picking up the LLVM tools if they happen to be available otherwise.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D85329
The file was modifiedllvm/runtimes/CMakeLists.txt (diff)
Commit e2ccf7f178ddaf202171a96cd6f41daa7a74a09c by mcinally
[SVE] Lower fixed length VECREDUCE_[SMAX|SMIN] to Scalable

This patch is pretty similar to the VECREDUCE_ADD patch, with some minor tweaks.

Results from the AArch64ISD::[SMAX|SMIN]V_PRED return element sized results. This requires an ANY_EXTEND for results < 32-bits, since Legalization promotes those results.

There is no NEON i64 vector support for SMAXV|SMINV, so use SVE for those.

Differential Revision: https://reviews.llvm.org/D88259
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-int-reduce.ll (diff)
Commit 9a4767411e89d35e55074e8783b909d0e8c6b2df by mcinally
[SVE] Revert accidental change from 405e22fbe8719cff6c40eec15c2044f42527f116

Accidentally commited two lines that were not intended. Remove those.
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp (diff)
Commit e17f52d623cc146b7d9bf5a2e02965043508b4c4 by Adrian Prantl
Add a verifier check that rejects non-distinct DISubprogram function
attachments. They would crash the backend, which expects all
DISubprograms that are not part of the type system to have a unit field.

Clang right before https://reviews.llvm.org/D79967 would generate this
kind of broken IR.

rdar://problem/69534688
The file was modifiedllvm/test/DebugInfo/Generic/2009-11-03-InsertExtractValue.ll (diff)
The file was modifiedllvm/lib/IR/Verifier.cpp (diff)
The file was addedllvm/test/Verifier/unique-disubprogram.ll
Commit 0b7f03b98d82dac7224e00377329577634d92c17 by jurahul
[NFC] Fix minor typos in comments and reuse concreteOp.

Differential Revision: https://reviews.llvm.org/D88242
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td (diff)
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h (diff)
Commit 8046ab04a75bcd3a455faafa1364c67726748a78 by jurahul
[NFC] Fix syntax of ranked memrefs in the MLIR Language Reference.

- Eliminate incorrect |
- Eliminate memspace0 as the memory spaces currently are integer literals and memory
  space 0 is not explicitly printed.

Differential Revision: https://reviews.llvm.org/D88171
The file was modifiedmlir/docs/LangRef.md (diff)
Commit 2a11a197af7e72725fe461ba9917756b1b09661a by Louis Dionne
[libc++][ci] Don't require passing --token to phabricator-report

The CONDUIT_TOKEN is already taken from the environment. Also, disable
reporting back to Phabricator for now until we're ready to start spamming
the results back. This still needs a bit of testing.
The file was modifiedlibcxx/utils/ci/buildkite-pipeline.yml (diff)
The file was modifiedlibcxx/utils/ci/phabricator-report (diff)
Commit c74da051b8680d322328a1ba2e6c2ed794a74f59 by daltenty
[CMake] Make sure _cmake_system_name has a default

We currently try to pick it up from the CMake arguments passed to llvm_ExternalProject_Add but
if there isn't an explicit option passed, we should reflect CMake's own default behaviour
of targeting the host, since we'll make decisions about what tools to use for the build based on
the setting. Otherwise, we'll get different behaviour between configuring an external project with
the default target and configuring with an explicit one targeting the same platform.

Reviewed By: stevewan, hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D88157
The file was modifiedllvm/cmake/modules/LLVMExternalProjectUtils.cmake (diff)
Commit 179e15d53acdb1fc27e9e2c8f7e1d1e08dcf4a89 by Dávid Bolvanský
[SystemZ] Optimize bcmp calls (PR47420)

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

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D87988
The file was addedllvm/test/CodeGen/SystemZ/bcmp.ll
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h (diff)
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (diff)
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h (diff)
Commit b5a3b901c73082c82f6eb387323cd61525423e2d by flo
[SCEV] Add support for `x == constant` to CollectCondition.

Add support for EQ predicates with constant operand. In that case, using
the constant instead of an unknown expression should always be
beneficial.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp (diff)
The file was modifiedllvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll (diff)