Changes

Summary

  1. [mlir] Fix build on Windows on Arm (details)
  2. [clang][tooling] NFC: Refactor command-line diagnostic tests (details)
  3. [X86][FP16] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A) (details)
  4. Wrap xar/xar.h include in extern "C" block (details)
  5. [NFC] Wrap MLIR addAffineForOpDomain warning with LLVM_DEBUG (details)
  6. [clangd] Ensure lambda init-capture gets semantic token (details)
  7. [ModuleInlinerWrapperPass] Do some naive printing of wrapped pipeline with -print-pipeline-passes (details)
  8. [DAGCombiner] Rename isAlias as mayAlias. NFC (details)
  9. [TII] Remove the MFI argument to convertToThreeAddress. NFC. (details)
  10. [Driver] Correctly handle static C++ standard library (details)
  11. Revert "[Driver] Correctly handle static C++ standard library" (details)
  12. [libc] Add optimized memset for AArch64 (details)
  13. [InstSimplify] Don't lose inbounds when simplifying a GEP (details)
  14. tsan: remove unnecessary enum values (NFC) (details)
  15. tsan: remove DontDumpShadow from Go build (details)
  16. tsan: add another deep stack test (details)
  17. tsan: use RawShadow instead of u64 more (details)
  18. tsan: move shadow declaration into a separate header file (NFC) (details)
  19. [fir][NFC] inline trival isa_<type> functions (details)
  20. [RISCV][VP] Add support for VP_REDUCE_* operations (details)
  21. [lldb] Fix DomainSocket::GetSocketName for unnamed sockets (details)
  22. [BasicBlockUtils] Fixup of an assumed typo in MergeBlockIntoPredecessor (details)
  23. [CodeGen] RegisterCoalescer::buildVRegToDbgValueMap - use const-ref value in for-range loop. NFCI. (details)
  24. [CodeGen] ProcessSDDbgValues - use const-ref value in for-range loop. NFCI. (details)
  25. [RISCV] Add missing op type OPERAND_UIMM2, OPERAND_UIMM3 and OPERAND_UIMM7 for verifyInstruction (details)
  26. [DSE] Track earliest escape, use for loads in isReadClobber. (details)
  27. tsan: remove expected race leftover (details)
  28. [libc++] Remove uses of _LIBCPP_HAS_NO_VARIABLE_TEMPLATES (details)
  29. [CodeGen] update test file to not run the entire LLVM optimizer; NFC (details)
  30. [gn build] (semi-manually) port 702cb7afe9de (details)
  31. [gn build] (manually) port ac191bcc99e2f (details)
  32. [gn build] Port f4abdb0c074b (details)
  33. [InstCombine] fold cast of right-shift if high bits are not demanded (2nd try) (details)
  34. [CostModel][X86] Increase i64 mul cost from 1 to 2 (details)
  35. clangd: Do not report inline overrides twice (details)
  36. [ORC][examples] Fix segfault in LLJITWithTargetProcessControl (details)
  37. [Sema] Fix a null pointer reference crash. (details)
  38. [AMDGPU] Avoid processing functions in amdgpu-propagate-attributes pass for shaders (details)
  39. Pass some DataLayout arguments by const-ref (details)
Commit b7050c791d8951c0a099bf162f9ab3a696611b7d by diana.picus
[mlir] Fix build on Windows on Arm

clang-cl errors out while handling the templated version of tgfmt. This
patch works around the issue by explicitly choosing the non-templated
version of tgfmt, which takes an ArrayRef<std::string>.

More details in this thread:
https://lists.llvm.org/pipermail/cfe-dev/2021-September/068936.html

Thanks @Mehdi Amini for suggesting the fix :)

Differential Revision: https://reviews.llvm.org/D110223
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp (diff)
Commit 352a2e67162541efe79a1e144b40a054751e7d5c by Jan Svoboda
[clang][tooling] NFC: Refactor command-line diagnostic tests

This patch uses a different command-line arguments to test `clang::tooling::ToolInvocation` that are not specific to Darwin.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D110160
The file was modifiedclang/unittests/Tooling/ToolingTest.cpp (diff)
Commit 76656ec8ec535bd17afc998112a83c7c55ad7719 by chen3.liu
[X86][FP16] Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A)

This patch is to support transform something like
_mm512_add_ph(acc, _mm512_fmadd_pch(a, b, _mm512_setzero_ph()))
to _mm512_fmadd_pch(a, b, acc).

Differential Revision: https://reviews.llvm.org/D109953
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
The file was addedllvm/test/CodeGen/X86/avx512fp16-combine-vfmac-fadd.ll
Commit 08ef24f6abdfaee038c47e3fe0b61b40e8fd9053 by sylvestre
Wrap xar/xar.h include in extern "C" block

Without such wrapping, linking lld fails with missing symbols because of
C++ symbol mangling with older versions of the MacOSX SDK, in which
xar.h doesn't have an extern "C" block itself.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D110224
The file was modifiedlld/MachO/SyntheticSections.cpp (diff)
Commit 1f3f144446d1766b6bd63ac02a064450c4fa5e55 by shivam98.tkg
[NFC] Wrap MLIR addAffineForOpDomain warning with LLVM_DEBUG

Current warning message in method `addAffineForOpDomain` of mlir/lib/Analysis/AffineStructures.cpp is being printed to the stdout/stderr.
This patch redirects the warning with LLVM_DEBUG following standard llvm practice.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D108340
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp (diff)
Commit 4223195de3eaaa9c221d1f178899f221be6264c5 by zeratul976
[clangd] Ensure lambda init-capture gets semantic token

Prior to this patch, CollectExtraHighlightings would incorrectly produce
a token for the init-capture's type which overlapped the name and
resulted in both being dropped.

Fixes https://github.com/clangd/clangd/issues/868

Differential Revision: https://reviews.llvm.org/D110130
The file was modifiedclang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp (diff)
The file was modifiedclang-tools-extra/clangd/SemanticHighlighting.cpp (diff)
Commit c5e0313e4489cb3130f441685fd4207eeee6aa48 by bjorn.a.pettersson
[ModuleInlinerWrapperPass] Do some naive printing of wrapped pipeline with -print-pipeline-passes

Bisecting and reducing opt pipelines that includes the
ModuleInlinerWrapperPass has turned out to be a bit problematic.
This is far from perfect (it still lacks information about inline
advisor params etc.), but it should give some kind of hint to what
the wrapped pipeline looks like when using -print-pipeline-passes.

Reviewed By: aeubanks, mtrofin

Differential Revision: https://reviews.llvm.org/D109878
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp (diff)
The file was modifiedllvm/include/llvm/Transforms/IPO/Inliner.h (diff)
The file was modifiedllvm/test/Other/new-pm-print-pipeline.ll (diff)
Commit c3ae8ecb520e6565594272d12e447e295ce09c9b by bjorn.a.pettersson
[DAGCombiner] Rename isAlias as mayAlias. NFC

Differential Revision: https://reviews.llvm.org/D110062
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)
Commit 6cef28ed2df19c197790ca777423fc1c2572c138 by jay.foad
[TII] Remove the MFI argument to convertToThreeAddress. NFC.

This simplifies the API and addresses a FIXME in
TwoAddressInstructionPass::convertInstTo3Addr.

Differential Revision: https://reviews.llvm.org/D110229
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.h (diff)
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp (diff)
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp (diff)
The file was modifiedllvm/include/llvm/CodeGen/TargetInstrInfo.h (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.h (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.h (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp (diff)
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.h (diff)
The file was modifiedllvm/lib/Target/SystemZ/SystemZInstrInfo.cpp (diff)
The file was modifiedllvm/lib/CodeGen/TwoAddressInstructionPass.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp (diff)
The file was modifiedllvm/lib/Target/SystemZ/SystemZInstrInfo.h (diff)
The file was modifiedllvm/lib/Target/X86/X86FixupLEAs.cpp (diff)
Commit 5e28c892d06f95600f8b6290ad4de38bfe142637 by phosek
[Driver] Correctly handle static C++ standard library

When statically linking C++ standard library, we shouldn't add -Bdynamic
after including the library on the link line because that might override
user settings like -static and -static-pie. Rather, we should surround
the library with --push-state/--pop-state to make sure that -Bstatic
only applies to C++ standard library and nothing else. This has been
supported since GNU ld 2.25 (2014) so backwards compatibility should
no longer be a concern.

Differential Revision: https://reviews.llvm.org/D110128
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp (diff)
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp (diff)
The file was modifiedclang/test/Driver/linux-ld.c (diff)
The file was modifiedclang/test/Driver/fuchsia.cpp (diff)
Commit 904ca7d2ed97bf114fd11373c722acd1e54bfaa3 by phosek
Revert "[Driver] Correctly handle static C++ standard library"

This reverts commit 5e28c892d06f95600f8b6290ad4de38bfe142637 as
the linker on the clang-ppc64le-rhel bot doesn't seem to support
--push-state/--pop-state.
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp (diff)
The file was modifiedclang/test/Driver/fuchsia.cpp (diff)
The file was modifiedclang/test/Driver/linux-ld.c (diff)
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp (diff)
Commit 8b87c3d5736730cda1d8856098621029b759f3d1 by andre.simoesdiasvieira
[libc] Add optimized memset for AArch64

Differential Revision: https://reviews.llvm.org/D107848
The file was modifiedlibc/src/string/CMakeLists.txt (diff)
The file was modifiedlibc/src/string/memory_utils/elements_aarch64.h (diff)
The file was addedlibc/src/string/aarch64/memset.cpp
Commit 05663dc14644d12d688155d55ba267e7b7e69817 by Alexander.Richardson
[InstSimplify] Don't lose inbounds when simplifying a GEP

I noticed this while working on a (ptrtoint (gep null, x)) -> x fold.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D110168
The file was modifiedllvm/include/llvm/Analysis/InstructionSimplify.h (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp (diff)
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp (diff)
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp (diff)
The file was modifiedllvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll (diff)
The file was modifiedllvm/lib/Analysis/PHITransAddr.cpp (diff)
Commit af8b14c278c2cb5309562b6e3fa55333c2889d86 by dvyukov
tsan: remove unnecessary enum values (NFC)

Remove unnecessary enum values in the memory profiler.
There is no point in spelling them, it can only lead to bugs
and larger diffs when values are added/removed.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110263
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp (diff)
Commit 356ecd9bd1c5c10ff776dced80f353839fafb354 by dvyukov
tsan: remove DontDumpShadow from Go build

DontDumpShadow is used only in InitializeShadowMemory which is Go-only.

Depends on D110263.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110264
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp (diff)
Commit dcc6db22d8508a85ecd2b8bdcc5ae5646968c083 by dvyukov
tsan: add another deep stack test

Add a test for a trace corner case that lead to a bug
in experimental runtime replacement.
Since it passes with the current runtime it makes sense
to submit it on its own.

Depends on D110264.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110265
The file was addedcompiler-rt/test/tsan/deep_stack2.cpp
Commit 20d3e518010a2a4fa1f4cdc9b7b885f13966a19c by dvyukov
tsan: use RawShadow instead of u64 more

Fix few remaining cases where we use u64 instead of the new RawShadow type.

Depends on D110265.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110266
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp (diff)
Commit 702cb7afe9de21b9a86d012cdd0b283496e619af by dvyukov
tsan: move shadow declaration into a separate header file (NFC)

tsan_rtl.h is very huge and contains too many things.
Move FastState and Shadow types into a new tsan_shadow.h file.
This also allows to use FastState/Shadow in other header files
without creating circular dependencies (which most likely will
happen today).

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110272
The file was modifiedcompiler-rt/lib/tsan/CMakeLists.txt (diff)
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h (diff)
The file was addedcompiler-rt/lib/tsan/rtl/tsan_shadow.h
Commit ce59ccd04023cab3a837da14079ca2dcbfebb70c by clementval
[fir][NFC] inline trival isa_<type> functions

This patch is part of the upstreaming effort from fir-dev branch and sync changes. Inline trival `isa_<type>` functions.

Co-authored-by: schweitzpgi

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D110233
The file was modifiedflang/lib/Optimizer/Dialect/FIRType.cpp (diff)
The file was modifiedflang/include/flang/Optimizer/Dialect/FIRType.h (diff)
Commit e7c879a69d6b61f35969936a9efd46bcfbf80ca0 by fraser
[RISCV][VP] Add support for VP_REDUCE_* operations

This patch adds codegen support for lowering the vector-predicated
reduction intrinsics to RVV instructions. The process is similar to that
of the other reduction intrinsics, save for the fact that every VP
reduction has a start value. We reuse the existing custom "VL" nodes,
adding extra patterns where required to handle non-true masks.

To support these nodes, the `RISCVISD::VECREDUCE_*_VL` nodes have been
given an explicit "merge" operand. This is to faciliate the VP
reductions, where we must be careful to ensure that even if no operation
is performed (when VL=0) we still produce the start value. The RVV
reductions don't update the destination register under these conditions,
so we tie the splatted start value to the output register.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D107657
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h (diff)
The file was addedllvm/test/CodeGen/RISCV/rvv/vreductions-mask-vp.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp (diff)
The file was addedllvm/test/CodeGen/RISCV/rvv/vreductions-int-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-mask-vp.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td (diff)
The file was addedllvm/test/CodeGen/RISCV/rvv/vreductions-fp-vp.ll
Commit 5685eb950da7c6901c8b264a3c93e8ea63b34d3d by pavel
[lldb] Fix DomainSocket::GetSocketName for unnamed sockets

getpeername will return addrlen = 2 (sizeof sa_family_t) for unnamed
sockets (those not assigned a name with bind(2)). This is typically true
for client sockets as well as those created by socketpair(2).

This GetSocketName used to crash for sockets which were connected to
these kinds of sockets. Now it returns an empty string.
The file was modifiedlldb/unittests/Host/SocketTest.cpp (diff)
The file was modifiedlldb/source/Host/posix/DomainSocket.cpp (diff)
Commit 85a586501bcc5b556d34a566b9d256d56d6fc5ba by bjorn.a.pettersson
[BasicBlockUtils] Fixup of an assumed typo in MergeBlockIntoPredecessor

The NFC commit e5692a564a73ef63b7b changed the logic for
DomTreeUpdates to use the range [succ_begin, succ_begin) when
looking for SuccsOfPredBB rather than using [succ_begin, succ_end).

As the commit was NFC this is identified as a typo (it has been
discussed briefly in phabricator).

The typo was found when inspecting the code, so I've got no idea if
changing back to the old range has any significant impact (such as
solving any PR:s or causing some new problems). But at least this
restores the code to the originally indented behavior.
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp (diff)
Commit 5cabe4d9d3226bfd0856ac031b63ab641acc08f5 by llvm-dev
[CodeGen] RegisterCoalescer::buildVRegToDbgValueMap - use const-ref value in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
The file was modifiedllvm/lib/CodeGen/RegisterCoalescer.cpp (diff)
Commit 2a5936faf0f3da9f55109ac1ed3b7b45436e3ced by llvm-dev
[CodeGen] ProcessSDDbgValues - use const-ref value in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (diff)
Commit fbacf5ad385c63c73060369ac11dd535e44a37ce by jim
[RISCV] Add missing op type OPERAND_UIMM2, OPERAND_UIMM3 and OPERAND_UIMM7 for verifyInstruction

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D110307
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.cpp (diff)
Commit 5ce89279c0986d0bcbe526dce52f91dd0c16427c by flo
[DSE] Track earliest escape, use for loads in isReadClobber.

At the moment, DSE only considers whether a pointer may be captured at
all in a function. This leads to cases where we fail to remove stores to
local objects because we do not check if they escape before potential
read-clobbers or after.

Doing context-sensitive escape queries in isReadClobber has been removed
a while ago in d1a1cce5b130 to save compile-time. See PR50220 for more
context.

This patch introduces a new capture tracker, which keeps track of the
'earliest' capture. An instruction A is considered earlier than instruction
B, if A dominates B. If 2 escapes do not dominate each other, the
terminator of the common dominator is chosen. If not all uses cannot be
analyzed, the earliest escape is set to the first instruction in the
function entry block.

If the query instruction dominates the earliest escape and is not in a
cycle, then pointer does not escape before the query instruction.

This patch uses this information when checking if a load of a loaded
underlying object may alias a write to a stack object. If the stack
object does not escape before the load, they do not alias.

I will share a follow-up patch to also use the information for call
instructions to fix PR50220.

In terms of compile-time, the impact is low in general,
    NewPM-O3: +0.05%
    NewPM-ReleaseThinLTO: +0.05%
    NewPM-ReleaseLTO-g: +0.03

with the largest change being tramp3d-v4 (+0.30%)
http://llvm-compile-time-tracker.com/compare.php?from=1a3b3301d7aa9ab25a8bdf045c77298b087e3930&to=bc6c6899cae757c3480f4ad4874a76fc1eafb0be&stat=instructions

Compared to always computing the capture information on demand, we get
the following benefits from the caching:
NewPM-O3: -0.03%
NewPM-ReleaseThinLTO: -0.08%
NewPM-ReleaseLTO-g: -0.04%

The biggest speedup is tramp3d-v4 (-0.21%).
http://llvm-compile-time-tracker.com/compare.php?from=0b0c99177d1511469c633282ef67f20c851f58b1&to=bc6c6899cae757c3480f4ad4874a76fc1eafb0be&stat=instructions

Overall there is a small, but noticeable benefit from caching. I am not
entirely sure if the speedups warrant the extra complexity of caching.
The way the caching works also means that we might miss a few cases, as
it is less precise. Also, there may be a better way to cache things.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D109844
The file was modifiedllvm/include/llvm/Analysis/CaptureTracking.h (diff)
The file was modifiedllvm/test/Transforms/DeadStoreElimination/captures-before-load.ll (diff)
The file was modifiedllvm/lib/Analysis/CaptureTracking.cpp (diff)
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (diff)
Commit 7faf1285f2c416494aacf7ee13e70e330b2f0540 by dvyukov
tsan: remove expected race leftover

Remove nmissed_expected variable.
It's a leftover from removed "expected race" feature and is never incremented.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110321
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h (diff)
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp (diff)
Commit 1711a6ec650980764d97b3be148745e2813a3707 by Louis Dionne
[libc++] Remove uses of _LIBCPP_HAS_NO_VARIABLE_TEMPLATES

All supported compilers provide support for variable templates now.

Differential Revision: https://reviews.llvm.org/D110284
The file was modifiedlibcxx/include/__config (diff)
The file was modifiedlibcxx/test/libcxx/selftest/test_macros.pass.cpp (diff)
The file was modifiedlibcxx/include/type_traits (diff)
The file was modifiedlibcxx/test/support/test_macros.h (diff)
The file was modifiedlibcxx/include/ratio (diff)
The file was modifiedlibcxx/include/chrono (diff)
Commit c75c5c5f8f3740716c9a1c4fb1d8f7e753af2cf6 by spatel
[CodeGen] update test file to not run the entire LLVM optimizer; NFC

Clang regression tests should not break when changes are made to
the LLVM optimizer. This file broke on the 1st attempt at D110170,
so I'm trying to prevent that on another try.

Similar to other files in this directory, we make a compromise and
run -mem2reg to reduce noise by about 1000 lines out of 5000+ CHECK lines.
The file was modifiedclang/test/CodeGen/aapcs-bitfield.c (diff)
Commit cef0280a95dd969f18a5cd3c2238a60a25ef4cce by thakis
[gn build] (semi-manually) port 702cb7afe9de
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/tsan/BUILD.gn (diff)
Commit 64f623d4c37c686e74fae6f1a3e33dd4f39e1423 by thakis
[gn build] (manually) port ac191bcc99e2f
The file was modifiedllvm/utils/gn/secondary/compiler-rt/test/BUILD.gn (diff)
Commit ac889a5262f230eaccfbe60ad2c1d1ae60280623 by llvmgnsyncbot
[gn build] Port f4abdb0c074b
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn (diff)
Commit bb9333c3504a4a02b982526ad8264d14c6ec1ad4 by spatel
[InstCombine] fold cast of right-shift if high bits are not demanded (2nd try)

The 1st try at this was reverted because it caused an infinite loop in instcombine.
That should be fixed after:
1cd6b44f267b

(masked) trunc (lshr X, C) --> (masked) lshr (trunc X), C

Narrowing the shift should be better for analysis and can lead
to follow-on transforms as shown.

Attempt at a general proof in Alive2:
https://alive2.llvm.org/ce/z/tRnnSF

Here are a couple of the specific tests:
https://alive2.llvm.org/ce/z/bCnTp-
https://alive2.llvm.org/ce/z/TfaHnb

Differential Revision: https://reviews.llvm.org/D110170
The file was modifiedllvm/test/Transforms/InstCombine/trunc-demand.ll (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp (diff)
Commit c931d35216a320465947a5a46b158cf71024458d by llvm-dev
[CostModel][X86] Increase i64 mul cost from 1 to 2

Only the most recent cpus support really 1cy 64-bit multiplies, and the X64 cost table represents a realistic worst case. The 1cy value was also discouraging vectorization when most vXi64 PMULDQ expansions aren't actually slower than scalarization.

Noticed while investigating PR51436.
The file was modifiedllvm/test/Analysis/CostModel/X86/arith.ll (diff)
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-mul.ll (diff)
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/arith-fix.ll (diff)
The file was modifiedllvm/test/Analysis/CostModel/X86/slm-arith-costs.ll (diff)
The file was modifiedllvm/test/Analysis/CostModel/X86/arith-overflow.ll (diff)
The file was modifiedllvm/test/Analysis/CostModel/X86/rem.ll (diff)
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp (diff)
The file was modifiedllvm/test/Analysis/CostModel/X86/arith-fix.ll (diff)
The file was modifiedllvm/test/Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll (diff)
Commit eb209c13cce99b1ad8d8e619bf2006f4376ed1ef by sam.mccall
clangd: Do not report inline overrides twice

... in textDocument/references.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D110324
The file was modifiedclang-tools-extra/clangd/unittests/XRefsTests.cpp (diff)
The file was modifiedclang-tools-extra/clangd/XRefs.cpp (diff)
Commit 828422747d65ab6f0e3cdd75ed9a35f0afedf589 by Stefan Gränitz
[ORC][examples] Fix segfault in LLJITWithTargetProcessControl

Issue reported during review D110260
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp (diff)
Commit 3778c1cd6ef5a3286d5d49e842a2c65fffb8f3a6 by hokein.wu
[Sema] Fix a null pointer reference crash.

Differential Revision: https://reviews.llvm.org/D110315
The file was modifiedclang/lib/Sema/SemaDecl.cpp (diff)
The file was addedclang/test/SemaCXX/rounding-math-crash.cpp
Commit 2ac53fffaeda809df34e3fb2c442b0fd85d4b0ff by Piotr Sobczak
[AMDGPU] Avoid processing functions in amdgpu-propagate-attributes pass for shaders

The pass amdgpu-propagate-attributes ("Early/Late propagate attributes
from kernels to functions") is currently run also for shaders, where
it does nothing. Modify the check so the pass only processes functions
for kernels.

Differential Revision: https://reviews.llvm.org/D109961
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp (diff)
Commit 5f2c53bdf4c58a488c098ed42c26dfcd369dd15e by llvm-dev
Pass some DataLayout arguments by const-ref

Avoid unnecessary copies, reported by MSVC static analyzer.
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp (diff)
The file was modifiedllvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp (diff)
The file was modifiedllvm/tools/llvm-exegesis/lib/Assembler.cpp (diff)