SuccessChanges

Summary

  1. [clangd] Bind outgoing calls through LSPBinder too. NFC (details)
  2. [DebugInfo] Keep the DWARF64 flag in the module metadata (details)
  3. [Driver] Support -gdwarf64 for assembly files (details)
  4. Follow up of rGdea4a63e6359, which committed a slightly different version than (details)
  5. [clang-tidy] Simplify delete null ptr check (details)
  6. [clang-tidy] Simplify inefficient algorithm check (details)
  7. [clang-tidy] Simplify const params check (details)
  8. [sanitizers] Define SANITIZER_INTERCEPTOR_HOOKS on FreeBSD (details)
  9. Add lit config for dir with standalone tests (details)
  10. [mlir][Shape] Generalize cstr_broadcastable folding for n-ary broadcasts (details)
  11. [X86][SSE] Add testcase for bug reported in D96345 (details)
  12. [RISCV] Add support for fixed vector vselect (details)
  13. [AMDGPU] Fix a miscompile with S_ADD/S_SUB (details)
  14. [lit] Add "early_tests" config option (details)
  15. [AMDGPU] Rename simplifyI24 to simplifyMul24 (details)
  16. [DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d))) (REAPPLIED) (details)
  17. [DAG] Pull out getTruncatedUSUBSAT helper from foldSubToUSubSat. NFCI. (details)
  18. [RISCV] Simplify BP initialisation (details)
Commit 7b83837af6f472e9c0ed0b96b78717d4a3c4dbfe by sam.mccall
[clangd] Bind outgoing calls through LSPBinder too. NFC

The redundancy around work-done-progress is annoying but ok for now.

There's a weirdness with context lifetimes around outgoing method calls, which
I've preserved to keep this NFC. We should probably fix it though.

Differential Revision: https://reviews.llvm.org/D96717
The file was modifiedclang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp
The file was modifiedclang-tools-extra/clangd/LSPBinder.h
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.h
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.cpp
The file was modifiedclang-tools-extra/clangd/Module.h
The file was modifiedclang-tools-extra/clangd/unittests/LSPBinderTests.cpp
Commit aa842896299b014dc1837f1a01dfccbd94242c84 by ikudrin
[DebugInfo] Keep the DWARF64 flag in the module metadata

This allows the option to affect the LTO output. Module::Max helps to
generate debug info for all modules in the same format.

Differential Revision: https://reviews.llvm.org/D96597
The file was addedclang/test/CodeGen/dwarf-format.c
The file was addedllvm/test/DebugInfo/X86/dwarf64-module-flag.ll
The file was modifiedllvm/lib/IR/Module.cpp
The file was modifiedllvm/include/llvm/IR/Module.h
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit 72eee60b2451e8627e492d42bf1d43247685bef9 by ikudrin
[Driver] Support -gdwarf64 for assembly files

The option was added in D90507 for C/C++ source files. This patch adds
support for assembly files.

Differential Revision: https://reviews.llvm.org/D96783
The file was modifiedclang/test/Driver/debug-options-as.c
The file was modifiedclang/tools/driver/cc1as_main.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was addedclang/test/Misc/cc1as-debug-format.s
Commit 5a641cf194d493752edade659f1e9f06294f4f9f by sjoerd.meijer
Follow up of rGdea4a63e6359, which committed a slightly different version than
intended.
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit d20961c6575c00fc998d901ded78c1a41edd61b1 by steveire
[clang-tidy] Simplify delete null ptr check

Because it no longer relies on finding implicit casts, this check now
works on templates which are not instantiated in the translation unit.

Differential Revision: https://reviews.llvm.org/D96138
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/readability-delete-null-pointer.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.h
The file was modifiedclang-tools-extra/clang-tidy/readability/DeleteNullPointerCheck.cpp
Commit 6c2eca96a2a59f69889a9d4133a819ab2e4fa1ef by steveire
[clang-tidy] Simplify inefficient algorithm check

The normalization of matchers means that this now works in all language
modes.

Differential Revision: https://reviews.llvm.org/D96140
The file was modifiedclang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.h
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/performance-inefficient-algorithm.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
Commit ca4485d9fc3449f7bb9522ee16ccf63f2219732c by steveire
[clang-tidy] Simplify const params check

Differential Revision: https://reviews.llvm.org/D96141
The file was modifiedclang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.h
The file was modifiedclang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.cpp
Commit ca9815fc247cc738f3ca7c8d5f482049371ca6e1 by Alexander.Richardson
[sanitizers] Define SANITIZER_INTERCEPTOR_HOOKS on FreeBSD

This fixes the weak_hooks.cpp test on FreeBSD. Since this feature appears
to be supported on almost all platforms, it might also make sense to turn
it into an opt-out list instead of being opt-in.

Reviewed By: krytarowski

Differential Revision: https://reviews.llvm.org/D96255
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
Commit 1e2d50936a3bff2c8065a99d06f37b51185fbd81 by thomasp
Add lit config for dir with standalone tests

Some test systems do not use lit for test discovery but only for its
substitution and test selection because they use another way of managing
test collections, e.g. CTest. This forces those tests to be invoked with
lit --no-indirectly-run-check. When a mix of lit version is in use, it
requires to detect the availability of that option.

This commit provides a new config option standalone_tests to signal a
directory made of tests meant to run as standalone. When this option is
set, lit skips test discovery and the indirectly run check. It also adds
the missing documentation for --no-indirectly-run-check.

Reviewed By: jdenny

Differential Revision: https://reviews.llvm.org/D94766
The file was modifiedllvm/utils/lit/lit/discovery.py
The file was addedllvm/utils/lit/tests/Inputs/standalone-tests/true.txt
The file was addedllvm/utils/lit/tests/Inputs/standalone-tests-with-suffixes/true.txt
The file was addedllvm/utils/lit/tests/Inputs/standalone-tests-with-suffixes/lit.cfg
The file was modifiedllvm/utils/lit/lit/TestingConfig.py
The file was modifiedllvm/utils/lit/tests/discovery.py
The file was addedllvm/utils/lit/tests/Inputs/standalone-tests-with-excludes/lit.cfg
The file was addedllvm/utils/lit/tests/Inputs/standalone-tests-with-excludes/true.txt
The file was modifiedllvm/docs/CommandGuide/lit.rst
The file was addedllvm/utils/lit/tests/Inputs/standalone-tests/lit.cfg
Commit 63a35f35ecf8a46e63af750a88faecfe1c6354a6 by benny.kra
[mlir][Shape] Generalize cstr_broadcastable folding for n-ary broadcasts

This is still fairly tricky code, but I tried to untangle it a bit.

Differential Revision: https://reviews.llvm.org/D96800
The file was modifiedmlir/test/Dialect/Shape/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/Traits.h
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/lib/Dialect/Traits.cpp
Commit f0d8e7333f1be352f616b61a7f8b018b025a5b34 by llvm-dev
[X86][SSE] Add testcase for bug reported in D96345

Failure to handle binop(shuffle(x,undef),shuffle(a,b))
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-combining.ll
Commit d81161646a3d9a57750383f8e8b6c0b9abc7624b by fraser
[RISCV] Add support for fixed vector vselect

This patch adds support for fixed-length vector vselect. It does so by
lowering them to a custom unmasked VSELECT_VL node with a vector length
operand.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D96768
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-vselect.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit 08131c7439336e84b9df3e37b3aaeb76b8f60702 by Piotr Sobczak
[AMDGPU] Fix a miscompile with S_ADD/S_SUB

The helper function isBoolSGPR is too aggressive when determining
when a v_cndmask can be skipped on a boolean value because the
function does not check the operands of and/or/xor.

This can be problematic for the Add/Sub combines that can leave
bits set even for inactive lanes leading to wrong results.

Fix this by inspecting the operands of and/or/xor recursively.

Differential Revision: https://reviews.llvm.org/D86878
The file was addedllvm/test/CodeGen/AMDGPU/combine-add-zext-xor.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 161e826c586eefad06751aa35e2c0b8070a70bb1 by dave
[lit] Add "early_tests" config option

With enough cores, the slowest tests can significantly change the total testing time if they happen to run late. With this change, a test suite can improve performance (for high-end systems) by listing just a few of the slowest tests up front.

Reviewed By: jdenny, jhenderson

Differential Revision: https://reviews.llvm.org/D96594
The file was addedllvm/utils/lit/tests/early-tests.py
The file was modifiedllvm/utils/lit/lit/TestingConfig.py
The file was modifiedllvm/utils/lit/lit/Test.py
The file was addedllvm/utils/lit/tests/Inputs/early-tests/bbb.txt
The file was addedllvm/utils/lit/tests/Inputs/early-tests/lit.cfg
The file was modifiedllvm/docs/CommandGuide/lit.rst
The file was addedllvm/utils/lit/tests/Inputs/early-tests/subdir/ccc.txt
The file was addedllvm/utils/lit/tests/Inputs/early-tests/aaa.txt
Commit c8be7e96bb718f7965fb69f8ed26aaa5175fd26b by jay.foad
[AMDGPU] Rename simplifyI24 to simplifyMul24

Also simplify one of its call sites. NFC.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Commit 05c64ea6722bc973ebf61653342518d065316feb by llvm-dev
[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d))) (REAPPLIED)

Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d))) -> bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d))

Attempt to fold from a shuffle of a pair of binops to a binop of shuffles, as long as one/both of the binop sources are also shuffles that can be merged with the outer shuffle. This should guarantee that we remove one binop without introducing any additional shuffles.

Technically there's potential for a merged shuffle's lowering to be poorer than the original shuffle, but it could also be better, and I'm not seeing any regressions as long as we keep the 'don't merge splats' rule already present in MergeInnerShuffle.

This expands and generalizes an existing X86 combine and attempts to merge either of each binop's sources (with an on-the-fly commutation of the shuffle mask) - we couldn't do that in the x86 version as it had to stay in a form that DAGCombine's MergeInnerShuffle would still recognise.

Fixes issue raised by @saugustine in rG5aa8f4c0843a where we were failing to replace null shuffle operands from MergeInnerShuffle to UNDEFs.

Differential Revision: https://reviews.llvm.org/D96345
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/bitcast-and-setcc-256.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/promote-cmp.ll
Commit 87fbc06d06670dac5d8309b4f2fae8073667b4e5 by llvm-dev
[DAG] Pull out getTruncatedUSUBSAT helper from foldSubToUSubSat. NFCI.

This will simplify an incoming generic implementation of D25987.

I'll rebase D96703 shortly to support this.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 709ea8bc87810b6cd6a3a4a79663303a95519063 by 932494295
[RISCV] Simplify BP initialisation

We can re-use copyPhysReg rather than writing a specialised copy.

Differential Revision: https://reviews.llvm.org/D95227
The file was modifiedllvm/lib/Target/RISCV/RISCVFrameLowering.cpp