LLVM/project 99b4548 — llvm/test/Instrumentation/InstrProfiling conditional-counter-updates.ll

[InstrProfiling] Generate test checks (NFC) (#226409)
DeltaFile
+51-33llvm/test/Instrumentation/InstrProfiling/conditional-counter-updates.ll
+51-331 files

LLVM/project 81e2e44 — llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Analysis/ScalarEvolution trip-count13.ll

[SCEV] Set BTC to zero, if constant max BTC < BECountIfTaken. (#226098)

If ConstantMaxBECount < BECountIfTaken, we know that the backedge is
never taken and BTC is zero.

No changes in
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1426.
The main motivation is to remove another difference between
howManyLessThans
and howManyGreaterThans, which does not have the BECountIfBackedgeTaken
logic and would compute tighter bounds for backedges never taken.

No compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=022fdfa1e5a0b85dc785d30b17be3880768b22dc&to=475eeff40ba520620a406a3f615d660ed7c3eec0&stat=instructions:u

PR: https://github.com/llvm/llvm-project/pull/226098
DeltaFile
+27-0llvm/test/Analysis/ScalarEvolution/trip-count13.ll
+14-6llvm/lib/Analysis/ScalarEvolution.cpp
+41-62 files

LLVM/project a465ac2 — clang/lib/AST APValue.cpp

[clang][NFC] Use llvm::ListSeparator in APValue::printPretty (#226125)

Instead of the manual `First` flag tracking.
DeltaFile
+6-12clang/lib/AST/APValue.cpp
+6-121 files

LLVM/project d9dbd96 — llvm/lib/Transforms/Vectorize VPlanUtils.h, llvm/test/Transforms/LoopVectorize induction-wrapflags.ll

[VPlan] Only retain NSW when possible in getFlagsFromIndDesc. (#226315)

getFlagsFromIndDesc is used to get the flags to use for wide inductions.
Those are normalized to Adds, with the step negated if the induction
binop is Sub.

Only retain all flags for Add. For Sub, never retain NUW and only keep
NSW if the step is known to not be signed min.

Alive2 Proofs showing incorrect NUW/NSW transfer and transfer of NSW if
step is != signed INT_MIN: https://alive2.llvm.org/ce/z/zGKeZg

Fixes https://github.com/llvm/llvm-project/issues/224024.
DeltaFile
+11-12llvm/test/Transforms/LoopVectorize/induction-wrapflags.ll
+14-5llvm/lib/Transforms/Vectorize/VPlanUtils.h
+2-2llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+27-193 files

LLVM/project fb1b13e — llvm/include/llvm/Target TargetMachine.h, llvm/lib/CodeGen CodeGenTargetMachineImpl.cpp MachineFunction.cpp

TargetMachine: Remove DataLayout field

Keep createDataLayout around but mark it as deprecated. Eventually
the ABIName field will move out of MCTargetOptions, which can change
the datalayout.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+6-40llvm/include/llvm/Target/TargetMachine.h
+11-7llvm/lib/Target/TargetMachine.cpp
+0-10llvm/lib/CodeGen/MachineFunction.cpp
+1-2llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
+18-594 files

LLVM/project 1735c10 — llvm/test/Instrumentation/SanitizerCoverage missing_dbg.ll missing_dbg_stack_depth.ll

[SanitizerCoverage] Split test (NFC) (#226405)

So these tests can actually be regenerated without heavy manual
editing.
DeltaFile
+101-0llvm/test/Instrumentation/SanitizerCoverage/missing_dbg_stack_depth.ll
+1-93llvm/test/Instrumentation/SanitizerCoverage/missing_dbg.ll
+102-932 files

LLVM/project 943263b — llvm/include/llvm/CodeGen AsmPrinter.h, llvm/lib/CodeGen/AsmPrinter AsmPrinter.cpp

TargetMachine: Remove pointer-size query methods

Remove the shim methods from the TargetMachine's copy of the
DataLayout, which will soon be eliminated. The Module owns the authoritative
DataLayout, so callers should read the value from the contextual Module.

Completely unreasonably, Mips's ABI name can change the pointer size which
we probably should just not support. Many other triple checks will never be
correct. This avoids potential mismatches in these contexts, but I still expect
this to be widely broken.

Some of the TargetLowering constructor changes and AMDGPULegalizerInfo
changes are kind of annoying. We could pass in the DataLayout through
the subtarget constructors but it didn't seem worth the effort and
the information should be derivable from the triple anyway.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+11-15llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+14-12llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+12-7llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+4-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+5-2llvm/include/llvm/CodeGen/AsmPrinter.h
+3-2llvm/lib/Target/AVR/AVRTargetMachine.h
+49-4132 files not shown
+108-8438 files

LLVM/project 91d5a53 — clang CMakeLists.txt, clang/lib/CIR CMakeLists.txt

[clang] Drop explicit -Woverloaded-virtual build option (#225359)

Nowadays, Clang and GCC have reasonable (and aligned) default
`-Woverloaded-virtual` warnings when using `-Wall`. Fall back to this
default and omit the more aggressive `-Woverloaded-virtual` warnings
only present in GCC's level 2 mode of the warning.

The motivation for this change is discussed in the following RFC:
https://discourse.llvm.org/t/rfc-drop-explicit-woverloaded-virtual-clang-build-option/91857

Removing the explicit `-Woverloaded-virtual` build option also allows
removing the workaround from e1bd39c.
DeltaFile
+0-11clang/tools/cir-opt/CMakeLists.txt
+0-11clang/lib/CIR/CMakeLists.txt
+1-1clang/CMakeLists.txt
+1-233 files

LLVM/project 8e11ba9 — clang/docs LanguageExtensions.md, clang/test/CodeGen/PowerPC loadtime-comment-vars-modules.cpp

[Clang][AIX] Document and test -mloadtime-comment-vars with inline variables across modules
DeltaFile
+35-19clang/test/CodeGen/PowerPC/loadtime-comment-vars-modules.cpp
+19-14clang/docs/LanguageExtensions.md
+54-332 files

LLVM/project 1cc5657 — lldb/tools/lldb-dap DAP.cpp LLDBUtils.h

[lldb-dap] Create telemetry data only when built with telemetry. (#225785)

I am exploring fuzzing some parts of lldb-dap. but there is a fixed
amount of memory lldb-dap can use before the fuzzing stops to catch
memory leaks.
The telemetry dispatcher always creates telemetry regardless of if lldb
is built with telemetry enabled.

`SBStructuredData::SetFromJSON` adds the telemetry string to the
ConstString pool for every request and grows lldb-dap's memory usage
rapidly.
DeltaFile
+22-12lldb/tools/lldb-dap/LLDBUtils.h
+2-2lldb/tools/lldb-dap/DAP.cpp
+24-142 files

LLVM/project 0a0e0fa — libc/src/__support/net address.cpp, libc/src/arpa/inet CMakeLists.txt inet_pton.h

Implement inet_pton (#224644)

Implement the `inet_pton` function for `IPV4` and its unit tests.

Assisted-by: gemini
DeltaFile
+102-0libc/test/src/arpa/inet/inet_pton_test.cpp
+39-0libc/src/__support/net/address.cpp
+39-0libc/src/arpa/inet/inet_pton.cpp
+25-0libc/src/arpa/inet/inet_pton.h
+19-0libc/src/arpa/inet/CMakeLists.txt
+15-0libc/test/src/arpa/inet/CMakeLists.txt
+239-06 files not shown
+258-012 files

LLVM/project 54e14c1 — orc-rt/include/orc-rt/support Error.h, orc-rt/test/unit/support ErrorTest.cpp

[orc-rt] Make Expected's move operations conditionally noexcept. (#226393)

Expected<T>'s move constructor and move assignment operator are now
noexcept whenever T's storage type is nothrow-move-constructible.
Error's move operations are already noexcept, so this is the only
condition under which moving an Expected can throw.

This allows callables that take Expected<T> by value to be stored in
noexcept-qualified move_only_functions: is_nothrow_invocable includes
the initialization of by-value parameters, which previously used
Expected's potentially-throwing move constructor.
DeltaFile
+22-0orc-rt/test/unit/support/ErrorTest.cpp
+6-2orc-rt/include/orc-rt/support/Error.h
+28-22 files

LLVM/project b202c00 — llvm/utils/lit/lit util.py main.py, llvm/utils/lit/tests/unit Histogram.py

[lit] Include zero-duration tests in the --time-tests histogram (#226132)

`--time-tests` treated an elapsed time of 0 as missing, so they were
omitted from the histogram. That made time-tests.py flaky when FileCheck
expected every test to be listed.

The PR also avoids log(0) when every recorded time is zero.

Fixes
https://github.com/llvm/llvm-project/pull/208444#issuecomment-5805067757.
DeltaFile
+55-0llvm/utils/lit/tests/unit/Histogram.py
+3-1llvm/utils/lit/lit/main.py
+2-1llvm/utils/lit/lit/util.py
+60-23 files

LLVM/project bb4004f — llvm/test/CodeGen/AMDGPU anti-hints-multi-rule.gfx1250.mir flat-saddr-load.ll

[AMDGPU] Insert wmma coexec anti-hints rule
DeltaFile
+2,293-0llvm/test/CodeGen/AMDGPU/anti-hints-wmma-waw.gfx1250.mir
+1,610-0llvm/test/CodeGen/AMDGPU/anti-hints-wmma-war.gfx1250.mir
+360-398llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+497-0llvm/test/CodeGen/AMDGPU/anti-hints-addr-xcnt.gfx1250.mir
+194-178llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+351-0llvm/test/CodeGen/AMDGPU/anti-hints-multi-rule.gfx1250.mir
+5,305-57650 files not shown
+7,565-2,00356 files

LLVM/project 6c5ea95 — llvm/lib/Analysis LazyValueInfo.cpp ValueTracking.cpp, llvm/lib/Transforms/InstCombine InstCombineInternal.h InstCombineCasts.cpp

[LLVM] Fix typo "CxtI" (#226137)

LLVM had many instances of both "CxtI" and "CtxI". This patch
standardizes on the latter. I regard the former as a mistake that should
never have spread. In general usage, "ctx" is much more common as an
abbreviation for "context".

Same for "CxtF" and "CxtPhi" which occurred a few times each.

Also fix the few instances of "Cxt" to "Ctx", which was already
overwhelmingly more common.
DeltaFile
+106-106llvm/lib/Analysis/ValueTracking.cpp
+55-55llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+53-53llvm/lib/Analysis/LazyValueInfo.cpp
+40-40llvm/unittests/FileCheck/FileCheckTest.cpp
+32-32llvm/unittests/Analysis/ValueTrackingTest.cpp
+29-29llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+315-31558 files not shown
+628-62864 files

LLVM/project f17893d — libc/src/__support/OSUtil/linux/syscall_wrappers chmod.h, libc/src/sys/stat/linux CMakeLists.txt

[libc] Fix chmod syscall arguments and add symlink test (#226144)

Our Linux chmod wrapper had two bugs in how it invoked syscalls:
- the fchmodat syscall only takes three arguments (dfd, filename, mode),
but we were passing four (with a trailing 0 for flags).
- for fchmodat2, we were (mistakenly) passing AT_SYMLINK_NOFOLLOW, even
though chmod is specified to follow symlinks.

I reorder the checks to prefer fchmodat2 (with flags=0) if available,
and otherwise invoke fchmodat with the three arguments it expects.

I also add a test to verify that chmod follows symlinks and updates the
target file's permissions, and that attempting to chmod a dangling
symlink fails with ENOENT.

Assisted-by: Gemini
DeltaFile
+72-1libc/test/src/sys/stat/chmod_test.cpp
+4-5libc/src/__support/OSUtil/linux/syscall_wrappers/chmod.h
+7-0libc/test/src/sys/stat/CMakeLists.txt
+3-2libc/src/sys/stat/linux/CMakeLists.txt
+86-84 files

LLVM/project 74c5a64 — llvm/lib/Target/RISCV RISCVSubtarget.h RISCVTargetTransformInfo.cpp

[RISCV] Remove getMaxLMULForFixedLengthVectors. NFC (#226111)

The value can no longer be overridden after
https://github.com/llvm/llvm-project/pull/207312. Now there's nothing
specific about it to fixed vectors, so just inline it.
DeltaFile
+0-6llvm/lib/Target/RISCV/RISCVSubtarget.cpp
+2-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+1-1llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+0-1llvm/lib/Target/RISCV/RISCVSubtarget.h
+3-124 files

LLVM/project 7bcd6b4 — llvm/lib/Target/RISCV RISCVTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/RISCV rvv-expandload-compressstore.ll

[RISCV] Return cost for scalable compressstore/expandload intrinsics (#225143)

The type based cost still needs fixed.
DeltaFile
+21-16llvm/test/Analysis/CostModel/RISCV/rvv-expandload-compressstore.ll
+12-12llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+33-282 files

LLVM/project 1306a78 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv compressstore.ll expandload.ll

[RISCV] Fix scalable expandload lowering for i8 types (#225141)

This PR adds tests for scalable expandload/compressstore intrinsics, and
also fixes a crash where we tried to query getVectorNumElements on a
scalable vector for i8 element types.

We need to use vrgatherei16 when VLMAX may exceed 255, so compute this
for scalable vectors based off of getRealMaxVLen.

This is in preparation for compress pattern vectorization support in
https://github.com/llvm/llvm-project/pull/214491
DeltaFile
+6,086-6,026llvm/test/CodeGen/RISCV/rvv/expandload.ll
+88-0llvm/test/CodeGen/RISCV/rvv/compressstore.ll
+4-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+6,178-6,0273 files

LLVM/project 6bfa1c5 — libc/src/__support/OSUtil/linux/syscall_wrappers pselect6.h, libc/src/sys/select pselect.h

[libc] Implement pselect in sys/select (#226237)

Implement the standard POSIX.1-2008 / POSIX.1-2024 function `pselect` in
`<sys/select.h>`, bringing `<sys/select.h>` to 100% POSIX completion.

Fixes #226195.
DeltaFile
+165-0libc/test/src/sys/select/pselect_test.cpp
+71-0libc/src/__support/OSUtil/linux/syscall_wrappers/pselect6.h
+14-34libc/src/sys/select/linux/select.cpp
+48-0libc/src/sys/select/linux/pselect.cpp
+32-0libc/test/src/sys/select/CMakeLists.txt
+31-0libc/src/sys/select/pselect.h
+361-347 files not shown
+419-3913 files

LLVM/project f131c8c — llvm/test/CodeGen/AMDGPU lirp.mir

[AMDGPU] Use CFG in LIRP tests (#226260)

LIRP tests (llvm/test/CodeGen/AMDGPU/lirp.mir) use live intervals with
gaps and redefinitions.
With added -verify-machineinstrs, current test examples trigger machine
code check failure ("Multiple connected components in live interval").
This PR updates the tests to use CFG (loops with loop-carried vregs)
similar to the real world use cases, to fix the verification, and also
simplifies the tests a bit (using implifit defs and kills).

Test:
```
ninja -C build
ninja -C build check-llvm
./build/bin/llvm-lit -v llvm/test/CodeGen/AMDGPU/lirp.mir
```
DeltaFile
+44-37llvm/test/CodeGen/AMDGPU/lirp.mir
+44-371 files

LLVM/project 80f6ac4 — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Remove (X && Y) | (X && !Y) -> X combine. NFC

We have smaller combines that can take care of this now that we process recipes in a worklist
DeltaFile
+1-7llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-71 files

LLVM/project 4e6fa9c — llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

Precommit test
DeltaFile
+163-0llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+163-01 files

LLVM/project 756dc29 — llvm/lib/Transforms/Vectorize VPlanConstruction.cpp VPlanTransforms.cpp

Add custom inserter via template to VPBuilder.
DeltaFile
+40-31llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+22-23llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-1llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+63-553 files

LLVM/project 6bb1012 — llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h VPlanTransforms.cpp

Remove reundant virtual + const keyword
DeltaFile
+3-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-1llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+4-52 files

LLVM/project 7b3eacc — llvm/lib/Transforms/Vectorize VPlanUtils.h VPlanConstruction.cpp

Inline createConsecutiveVectorPointer/createAnyOfReduction
DeltaFile
+41-19llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+0-34llvm/lib/Transforms/Vectorize/VPlan.cpp
+3-3llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+3-1llvm/lib/Transforms/Vectorize/VPlan.h
+1-1llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+0-1llvm/lib/Transforms/Vectorize/VPlanUtils.h
+48-591 files not shown
+48-607 files

LLVM/project fadd23b — llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

[VPlan] Append recipes created via builder to worklist

The previous PR appended the top most created recipe to the worklist, and this PR extends it to any other nested recipes that were created, similar to InstCombine.

This removes the header mask in a good few more places on RISC-V as measured on SPEC CPU 2017, e.g. for the following loop:

```c
long f(const int *p, const int *q, long n) {
  long a = 0, b = 0;
  for (long i = 0;; i++) {
    if (p[i] && q[i]) { a += i; b += i; }
    if (i + 1 == n) break;
  }
  return a + b;
}
```

Before:


    [49 lines not shown]
DeltaFile
+26-8llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+5-7llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+10-2llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+41-173 files

LLVM/project 4db63ee — llvm/lib/Target/RISCV RISCVFrameLowering.cpp RISCVPushPopOptimizer.cpp, llvm/test/CodeGen/RISCV shadow-stack-zcmp.ll shadowcallstack.ll

[RISC-V] Do not emit cm.popret[z] with zicfiss (#196267)

When emitting shadow call stack protection instructions, the push/pop
optimization needs to be turned off because an sspopchk before a
cm.popret[z] is guaranteed to fail in a non-leaf function. In addition,
the sspopchk must be emitted after a cm.pop so that the ra has the
correct value when the check is performed.

Fixes: https://github.com/llvm/llvm-project/issues/196261

Co-authored-by: Nemanja Ivanovic <nemanja at synopsys.com>
(cherry picked from commit 255162ae0ebe805df151c5c4b48e1a47a5dd74f0)
DeltaFile
+330-0llvm/test/CodeGen/RISCV/shadowcallstack.ll
+57-0llvm/test/CodeGen/RISCV/shadow-stack-zcmp.ll
+9-0llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
+4-0llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+400-04 files

LLVM/project c937662 — llvm/lib/Target/RISCV RISCVFrameLowering.cpp, llvm/test/CodeGen/RISCV epilog-crash.ll

[RISC-V] Fix assert after 255162a (#212791)

The iterator passed-in may point to the end of the block which causes an
assertion failure when attempting to inspect the MI it points to. Guard
against this.

(cherry picked from commit f24da9d03ba5d25c523e050da2ca3c4060ca23d5)
DeltaFile
+37-0llvm/test/CodeGen/RISCV/epilog-crash.ll
+2-1llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+39-12 files

LLVM/project 6b34061 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sme-za-tailcall-fpdiff-align.ll sme-za-non-sibling-tailcall.ll

[AArch64] Don't emit stack restore for SME ZA non-sibling tail calls (#224721)

A tail call from a function with live ZA state was previously prevented
from being lowered as a sibling call to have a CALLSEQ_START to glue
INOUT_ZA_USE to. This led to bogus stack restores.

We now drop the INOUT_ZA_USE marker on tail calls and can thus lower as
sibling calls if needed to take advantage of the existing correct stack
restore behavior.

This is safe to do since tail calls use TCRETURN and the MachineSMEABI
pass requires live ZA state to stay live across returns anyway.

(cherry picked from commit ad695d46e4535f953558705541b71c2d938fb72b)
DeltaFile
+110-0llvm/test/CodeGen/AArch64/sme-za-non-sibling-tailcall.ll
+13-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+2-4llvm/test/CodeGen/AArch64/sme-za-tailcall-fpdiff-align.ll
+125-43 files