LLVM/project b9731f7llvm/lib/Target/RISCV RISCVAsmPrinter.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+130-137llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+40-40llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
+24-26llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
+21-21llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
+20-20llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+5-5llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
+240-2491 files not shown
+241-2507 files

LLVM/project d017767llvm/include/llvm/ADT SCCIterator.h

[ADT] Avoid repeated hash lookups (NFC) (#131418)

DeltaFile
+3-3llvm/include/llvm/ADT/SCCIterator.h
+3-31 files

LLVM/project f5f8f3cllvm/test/tools/llvm-gsymutil/ARM_AArch64 macho-gsym-merged-callsites-dsym.yaml

[GSYM] Update gSym unit test with stable / portable path (#131204)

This patch adds `-fdebug-compilation-dir=.` to the clang invocation in
`llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml`
and updates the rest of the test accordingly.

Previously, without the newly added argument, the test would
significantly change every time it was regenerated due to the generation
script using a temporary directory as the compilation directory. See
discussion in https://github.com/llvm/llvm-project/pull/129562 for
additional context.

This patch ensures determinism across test update runs - if the test
hasn't been updated and we try to regenerate the contents, nothing will
change.
DeltaFile
+65-64llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml
+65-641 files

LLVM/project 27631f1llvm/lib/Target/X86 X86ISelLoweringCall.cpp

.

Created using spr 1.3.5-bogner
DeltaFile
+2-2llvm/lib/Target/X86/X86ISelLoweringCall.cpp
+2-21 files

LLVM/project 5d110b3llvm/lib/Target/X86 X86ISelLoweringCall.cpp, llvm/test/CodeGen/X86 nocf_check.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+23-0llvm/test/CodeGen/X86/nocf_check.ll
+9-3llvm/lib/Target/X86/X86ISelLoweringCall.cpp
+32-32 files

LLVM/project f7cab64libcxx/test/std/numerics/numeric.ops/numeric.ops.sat saturate_cast.pass.cpp add_sat.pass.cpp

[libc++][numeric][NFC] Cleanup *Saturation arithmetic* tests (#101826)

This simplifies the tests a little bit:

Fixed -> TODO(LLVM20): remove [[maybe_unused]] and `{}` scope since all
supported compilers support "Placeholder variables with no name"

*IMPORTANT: Requires Apple Clang with [P2169R4: A nice placeholder with
no name](https://wg21.link/P2169R4)*

---------

Co-authored-by: Hristo Hristov <zingam at outlook.com>
DeltaFile
+69-69libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/saturate_cast.pass.cpp
+6-5libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/add_sat.pass.cpp
+5-5libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/sub_sat.pass.cpp
+5-5libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/div_sat.pass.cpp
+5-5libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/mul_sat.pass.cpp
+1-1libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/mul_sat.compile.pass.cpp
+91-905 files not shown
+96-9511 files

LLVM/project e30a5d6libcxx/include string

[libc++][NFC] Simplify string a bit (#127135)

This PR refactors `basic_string` a bit to simplify its implementation in
the following ways:
- Instead of manually checking whether a string is short or long,
followed by calling the specific functions (e.g., `__get_short_size()`,
`__get_long_size()`), we call the general functions (`size()`) to hide
the conditional checks and make the code more concise.
- Once a string is determined to be short or long, we directly call the
specific functions instead of the general versions to get rid of
unnecessary internal conditional checks. For example, for a long string,
we would directly call `{__set, __get}_long_pointer` instead of `{__set,
__get}_pointer()`.
- Variables that are defined in both the `if` and `else` branches are
now declared in a common scope to reduce redundancy.
- When the string size is calculated multiple times using
`traits_type::length(__s)`, a variable is introduced to store its
length. While modern compilers can optimize this with constant folding,
explicitly storing the length improves code readability and makes the
logic clearer.
- Fixed synopsis with missing default arguments.
DeltaFile
+53-45libcxx/include/string
+53-451 files

LLVM/project 2091547llvm/test/CodeGen/PowerPC global-merge-aix-sections.ll

[PPC codegen test] NFC: Fix RUN line; fix DATA checks to match 64-bit
DeltaFile
+6-6llvm/test/CodeGen/PowerPC/global-merge-aix-sections.ll
+6-61 files

LLVM/project 4286f4dlld/ELF InputFiles.cpp Driver.cpp, lld/docs ReleaseNotes.rst

[AArch64][GCS][LLD] Introduce -zgcs-report-dynamic Command Line Option (#127787)

When GCS was introduced to LLD, the gcs-report option allowed for a user
to gain information relating to if their relocatable objects supported
the feature. For an executable or shared-library to support GCS, all
relocatable objects must declare that they support GCS.

The gcs-report checks were only done on relocatable object files,
however for a program to enable GCS, the executable and all shared
libraries that it loads must enable GCS. gcs-report-dynamic enables
checks to be performed on all shared objects loaded by LLD, and in cases
where GCS is not supported, a warning or error will be emitted.

It should be noted that only shared files directly passed to LLD are
checked for GCS support. Files that are noted in the `DT_NEEDED` tags
are assumed to have had their GCS support checked when they were
created.

The behaviour of the -zgcs-dynamic-report option matches that of GNU ld.

    [25 lines not shown]
DeltaFile
+75-36lld/ELF/InputFiles.cpp
+28-1lld/ELF/Driver.cpp
+17-1lld/test/ELF/aarch64-feature-gcs.s
+4-0lld/docs/ReleaseNotes.rst
+2-0lld/ELF/InputFiles.h
+1-0lld/ELF/Config.h
+127-386 files

LLVM/project 7722d75llvm/lib/MC MCExpr.cpp, llvm/lib/Target/AArch64/MCTargetDesc AArch64MCExpr.cpp

[MC] evaluateAsRelocatableImpl: remove the Fixup argument

Follow-up to d6fbffa23c84e622735b3e880fd800985c1c0072 . This commit
updates all call sites and removes the argument from the function.
DeltaFile
+17-19llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp
+6-10llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h
+4-10llvm/lib/MC/MCExpr.cpp
+5-7llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp
+6-6llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+5-5llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCExpr.cpp
+43-5741 files not shown
+134-16447 files

LLVM/project ff2ed15llvm/lib/MC MCExpr.cpp, llvm/lib/Target/Mips/MCTargetDesc MipsMCExpr.cpp

[MC] evaluateAsAbsolute requires MCValue::RefKind==0

In `.equ a, 3; .if a at plt`, a at plt does not evaluate to an absolute value
(MCExpr::evaluateAsRelocatableImpl disables evaluation when the Kind !=
0 at parse time). Similarly, when using MCTargetValue,
evaluateAsAbsolute should return false when MCValue::RefKind==0.

This allows us to remove `if (!Asm)` check from MipsMCExpr.cpp
(%hi(0xdeadbeef) is not evaluated to a constant without RefKind) and
make targets less error-prone.
DeltaFile
+4-4llvm/lib/MC/MCExpr.cpp
+0-2llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
+4-62 files

LLVM/project 5e65b40clang-tools-extra/clang-tidy/modernize UseDefaultMemberInitCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] detect explicit casting within modernize-use-default-member-init (#129408)

This aims to fix a portion of #122480. Added some matchers to detect
explicit casting which utilize builtin types as its source expression.
these are the various forms of casting supported I thought would useful
for this check:

- C Style explicit casting
- Static explicit casting
- Functional explicit casting
DeltaFile
+36-0clang-tools-extra/test/clang-tidy/checkers/modernize/use-default-member-init.cpp
+10-2clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
+2-1clang-tools-extra/docs/ReleaseNotes.rst
+48-33 files

LLVM/project d6fbffallvm/include/llvm/MC MCExpr.h, llvm/lib/MC MCExpr.cpp

[MC] evaluateAsRelocatable: remove the Fixup argument

Commit 752b91bd821ad8a23e004b6cd631ae4f6984ae8b added the argument for
PowerPC to evaluate @l/@ha as constant in 2014. However, this is not
needed and has been cleaned up by
commit 8560da28c69de481f3ad147722577e87b902facb.

Mips also had an inappropriate use, which has been fixed by
79d84a878e83990c235da8710273a98bf835c915
DeltaFile
+10-12llvm/lib/MC/MCExpr.cpp
+0-1llvm/include/llvm/MC/MCExpr.h
+10-132 files

LLVM/project 0bd8a75llvm/lib/Transforms/Vectorize VPlanRecipes.cpp

[VPlan] Fix formatting after 6a8d5f22f.
DeltaFile
+4-2llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+4-21 files

LLVM/project 6a8d5f2llvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize/ARM pointer_iv.ll

[VPlan] Don't access canonical IV in VPWidenPointerInduction::execute.

This updates VPWidenPointerInductionRecipe::execute to not use the
canonical IV to determine the insert point. Instead, it relies on the
current recipe position. In cases where this is not sufficient, set the
insert point to the first non-phi instruction, to ensure phis are
created together.
DeltaFile
+4-9llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+5-5llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
+2-2llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll
+2-2llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll
+2-2llvm/test/Transforms/LoopVectorize/X86/optsize.ll
+2-2llvm/test/Transforms/LoopVectorize/X86/pr48340.ll
+17-229 files not shown
+30-3515 files

LLVM/project 79d84a8llvm/lib/Target/Mips/MCTargetDesc MipsMCExpr.cpp, llvm/test/MC/Mips hilo-addressing.s

MipsMCExpr: remove unneeded folding and fix a crash for %hi(und-$L3)

After folding the inner expression, we might get something like
%hi(0x30124), MipsAsmBackend::applyFixup will apply the relocation
operator, so we don't need to duplicate code in MipsMCExpr
(introduced by https://reviews.llvm.org/D19716).

While we don't know the encoding at parse time (see hilo-addressing.s),
it is not an issue.

This change also removes an inappropriate use of `Fixup`
(introduced in 2014 by 752b91bd821ad8a23e004b6cd631ae4f6984ae8b ; which
will go away with my next change).

In addition, fix a crash by porting the fix from RISCV.
```
lui $4, %hi(und-$L3)
```
DeltaFile
+3-65llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
+8-2llvm/test/MC/Mips/hilo-addressing.s
+11-672 files

LLVM/project 9a1e390clang/include/clang/Sema Sema.h, clang/lib/Sema SemaStmt.cpp SemaExprMember.cpp

[Clang] Do not emit nodiscard warnings for the base expr of static member access (#131450)

For an expression `nodiscard_function().static_member(), the nodiscard
warnings added by #120223, are not useful or actionable, and are
disruptive to some library implementations; we just remove them.

Fixes #131410
DeltaFile
+6-4clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
+0-5clang/include/clang/Sema/Sema.h
+0-4clang/lib/Sema/SemaStmt.cpp
+1-1clang/test/SemaCXX/ms-property.cpp
+0-1clang/lib/Sema/SemaExprMember.cpp
+7-155 files

LLVM/project aadfa9fllvm/test/Transforms/LoopVectorize transform-narrow-interleave-to-widen-memory.ll transform-narrow-interleave-to-widen-memory-with-wide-ops.ll, llvm/test/Transforms/LoopVectorize/AArch64 transform-narrow-interleave-to-widen-memory-constant-ops.ll

[LV] Add additional tests for narrowing interleave groups.

Extend test coverage for https://github.com/llvm/llvm-project/pull/106441.
DeltaFile
+179-1,530llvm/test/Transforms/LoopVectorize/transform-narrow-interleave-to-widen-memory.ll
+1,317-0llvm/test/Transforms/LoopVectorize/transform-narrow-interleave-to-widen-memory-with-wide-ops.ll
+245-0llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-constant-ops.ll
+84-0llvm/test/Transforms/LoopVectorize/X86/transform-narrow-interleave-to-widen-memory-gaps.ll
+1,825-1,5304 files

LLVM/project 6616acd.github/workflows docs.yml pr-code-format.yml

[Github] Change to step-security fork of changed actions

The tj-actions/changed-files repo has been taken down to the security
incident
(https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised).

This patch moves these jobs over step-security's fork, which has been
loosely audited and has had the malicious commits removed. This is
mainly intended as a stop-gap to get these actions running again while
we figure out the best path forward.
DeltaFile
+1-1.github/workflows/docs.yml
+1-1.github/workflows/pr-code-format.yml
+2-22 files

LLVM/project 7c26407lld/COFF SymbolTable.cpp Writer.cpp, lld/test/COFF arm64x-incl.s arm64x-symtab.s

[LLD][COFF] Clarify EC vs. native symbols in diagnostics on ARM64X (#130857)

On ARM64X, symbol names alone are ambiguous as they may refer to either
a native or an EC symbol. Append '(EC symbol)' or '(native symbol)' in
diagnostic messages to distinguish them.
DeltaFile
+17-10lld/COFF/SymbolTable.cpp
+7-4lld/COFF/Writer.cpp
+5-4lld/test/COFF/arm64x-incl.s
+3-3lld/COFF/InputFiles.cpp
+3-3lld/test/COFF/arm64x-symtab.s
+5-0lld/COFF/SymbolTable.h
+40-244 files not shown
+44-3310 files

LLVM/project 8560da2llvm/lib/Target/PowerPC/MCTargetDesc PPCMCExpr.cpp

[PowerPC] Simplify PPCMCExpr::evaluateAsRelocatableImpl

The signedness of the @l result is dependent on the instruction operand
(gas behavior).
E.g. in `addis 3,3,65535 at l`, 65535 at l is signed. Unfortunately
we don't have the information.

bfef1dd694d4c646f79521fa3258bbb2398a990c (2014) checked `Fixup`,
which was unnecessary and mislead https://reviews.llvm.org/D115419
to make the code more complex.

In PPCMCExpr::evaluateAsRelocatableImpl we don't need to validate the
result. Just continue and rely on the validation in ELFObjectWriter.
DeltaFile
+6-14llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp
+6-141 files

LLVM/project fc6fd6allvm/lib/Transforms/Utils CloneFunction.cpp

[NFC][Cloning] Clean up comments in CloneFunctionInto (#129153)


Summary:
Some comments no longer make sense nor refer to an existing code path.

Test Plan:
ninja check-llvm-unit
DeltaFile
+0-11llvm/lib/Transforms/Utils/CloneFunction.cpp
+0-111 files

LLVM/project 3168110llvm/include/llvm/Transforms/Instrumentation AddressSanitizerCommon.h, llvm/lib/Transforms/Instrumentation HWAddressSanitizer.cpp AddressSanitizer.cpp

[AddressSanitizer] Remove memory effects from functions (#130495)

If left as-is, subsequent optimizations might utilize the possible
memory effects and optimize-out the instrumentation. Think of the
following case:
```
  store i8 4, ptr %shadow
  call void @llvm.lifetime.start.p0(i64 4, ptr %local)
  %28 = call void @foo(ptr %local)
  store i8 -8, ptr %shadow
  call void @llvm.lifetime.end.p0(i64 4, ptr %local)
```

where `foo` is an external function with `memory(argmem: write)`. A pass
such as DeadStoreElimination is allowed to remove the initial store,
which might fail sanitizer checks within `foo`.

My first attempt was to add a `memory(readwrite)` at the call-site
level, but unfortunately the current implementation of

    [2 lines not shown]
DeltaFile
+3-42llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
+42-0llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+20-0llvm/test/Instrumentation/AddressSanitizer/remove-memory-effects.ll
+6-0llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h
+3-3llvm/test/Instrumentation/AddressSanitizer/AMDGPU/asan_instrument_mem_intrinsics.ll
+74-455 files

LLVM/project 37a57callvm/include/llvm/IR FMF.h, llvm/test/Transforms/LoopVectorize vplan-printing.ll

[FMF] Set all bits if needed when setting individual flags. (#131321)

Currently fast() won't return true if all flags are set via setXXX,
which is surprising. Update setters to set all bits if needed to make
sure isFast() consistently returns the expected result.

PR: https://github.com/llvm/llvm-project/pull/131321
DeltaFile
+7-10llvm/include/llvm/IR/FMF.h
+3-3llvm/test/Transforms/LoopVectorize/vplan-printing.ll
+2-2llvm/test/Transforms/LoopVectorize/AArch64/widen-call-with-intrinsic-or-libfunc.ll
+12-153 files

LLVM/project 5f449b9llvm/lib/Target/RISCV/MCTargetDesc RISCVMCExpr.cpp, llvm/test/MC/RISCV hilo-constaddr-expr.s

[RISCV] Allow RISCVMCExpr folding in the absence of linker relaxaxation

In the AArch64 target, `bar: add x0, x0, :lo12:foo-bar; foo:`
can be folded.

Remove the restriction (https://reviews.llvm.org/D104473), which became
unnecessary after https://reviews.llvm.org/D155357
DeltaFile
+6-1llvm/test/MC/RISCV/hilo-constaddr-expr.s
+1-4llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
+7-52 files

LLVM/project 56b05a0llvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize/AArch64 sve-widen-gep.ll sve-widen-phi.ll

[VPlan] Use VFxUF in VPWidenPointerInductionRecipe.

Use VFxUF VPValue instead of computing VF * UF explicitly.
DeltaFile
+3-6llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll
+2-4llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll
+2-4llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-phi.ll
+1-2llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+8-164 files

LLVM/project 5ae8f25llvm/lib/Target/RISCV/MCTargetDesc RISCVMCExpr.cpp RISCVELFObjectWriter.cpp

[RISCV] Move fixELFSymbolsInTLSFixups to getRelocType

fixELFSymbolsInTLSFixups walks the expression tree, which is complex and
unnecessary. As the expression must be relocatable, we can move the code
to getRelocType and just set SymA. The behavior is similar to GNU
assembler.
DeltaFile
+0-43llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
+11-0llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
+0-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
+11-453 files

LLVM/project a1a29c3llvm/lib/Target/Mips/MCTargetDesc MipsMCExpr.cpp MipsELFObjectWriter.cpp

[Mips] Move fixELFSymbolsInTLSFixups to getRelocType

fixELFSymbolsInTLSFixups walks the expression tree, which is complex and
unnecessary. As the expression must be relocatable, we can move the code
to getRelocType and just set SymA. The behavior is similar to GNU
assembler.
DeltaFile
+0-67llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
+17-0llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
+0-2llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.h
+17-693 files

LLVM/project 8ff27bbllvm/lib/Transforms/Vectorize VPlanRecipes.cpp

[VPlan] Remove unneeded select in VPWidenPointerInductionRecipe (NFC).
DeltaFile
+1-1llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+1-11 files

LLVM/project 6c2f847mlir/include/mlir/Transforms DialectConversion.h, mlir/lib/Conversion/GPUCommon GPUOpsLowering.cpp

[mlir][Transforms] Dialect Conversion: Add 1:N support to `remapInput` (#131454)

This commit adds 1:N support to `SignatureConversion::remapInputs`. This
API allows users to replace a block argument with multiple replacement
values. (And the block argument is dropped.) The API already supported
"bbarg --> multiple bbargs" mappings, but "bbarg --> multiple SSA
values" was missing.

---------

Co-authored-by: Markus Böck <markus.boeck02 at gmail.com>
DeltaFile
+21-12mlir/test/lib/Dialect/Test/TestPatterns.cpp
+24-3mlir/test/Transforms/test-legalizer.mlir
+10-9mlir/lib/Transforms/Utils/DialectConversion.cpp
+8-5mlir/include/mlir/Transforms/DialectConversion.h
+10-2mlir/test/lib/Dialect/Test/TestOps.td
+2-2mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
+75-336 files