LLVM/project 8045721llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/AArch64 transform-narrow-interleave-to-widen-memory-with-wide-ops-chained.ll

[VPlan] Allow recursive narrowing in interleave group narrowing. (#167310)

This allows canNarrowOps to recursively check if operands can be
narrowed, enabling narrowing of longer chains of operations that
feed interleave groups.

Depends on https://github.com/llvm/llvm-project/pull/167309.

PR: https://github.com/llvm/llvm-project/pull/167310
DeltaFile
+66-12llvm/test/Transforms/PhaseOrdering/AArch64/interleave_vec.ll
+18-31llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-with-wide-ops-chained.ll
+3-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+87-433 files

LLVM/project efc98declang-tools-extra/clang-tidy/abseil UncheckedStatusOrAccessCheck.cpp, clang-tools-extra/clang-tidy/bugprone UncheckedOptionalAccessCheck.cpp

[clang-tidy][NFC] Remove ad-hoc `unless(isExpansionInSystemHeader())` from matchers (#183020)

#151035 centralized the code to skip matching nodes in system headers,
so individual checks no longer need the
`unless(isExpansionInSystemHeader())` boilerplate to achieve that. You
can verify that the logic introduced in that PR is equivalent to
`unless(isExpansionInSystemHeader())`; they both essentially boil down
to
`!SourceManager.isInSystemHeader(Node.getBeginLoc())`:

https://github.com/llvm/llvm-project/blob/7c5c58cdc6553c969a11fee51bfd23ae659220d4/clang/include/clang/ASTMatchers/ASTMatchers.h#L283-L291

https://github.com/llvm/llvm-project/blob/7c5c58cdc6553c969a11fee51bfd23ae659220d4/clang/lib/ASTMatchers/ASTMatchFinder.cpp#L1363-L1372

I audited all the uses of `isExpansionInSystemHeader` in the codebase,
and the only one I found that wasn't redundant was one in
`TaggedUnionMemberCountCheck.cpp`.
DeltaFile
+4-9clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp
+5-5clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp
+2-4clang-tools-extra/clang-tidy/google/FunctionNamingCheck.cpp
+2-4clang-tools-extra/clang-tidy/abseil/UncheckedStatusOrAccessCheck.cpp
+3-3clang-tools-extra/clang-tidy/readability/MakeMemberFunctionConstCheck.cpp
+2-3clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStaticCheck.cpp
+18-2815 files not shown
+30-5621 files

LLVM/project 4518ec3llvm/include/llvm/MC MCAsmBaseStreamer.h MCEncodingCommentHelper.h, llvm/lib/MC MCAsmBaseStreamer.cpp MCEncodingCommentHelper.cpp

Refactor to use common base class
DeltaFile
+143-0llvm/lib/MC/MCAsmBaseStreamer.cpp
+0-127llvm/lib/MC/MCEncodingCommentHelper.cpp
+60-0llvm/include/llvm/MC/MCAsmBaseStreamer.h
+10-34llvm/lib/MC/MCAsmStreamer.cpp
+0-44llvm/include/llvm/MC/MCEncodingCommentHelper.h
+9-20llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+222-2252 files not shown
+223-2368 files

LLVM/project 75cbd58clang/test/Driver hip-temps-linux.hip

[HIP] Adjust test after #123359

Summary:
Just make this use the old driver for now, since that appraently worked.
Delete this later
DeltaFile
+2-2clang/test/Driver/hip-temps-linux.hip
+2-21 files

LLVM/project c91fc00lldb/packages/Python/lldbsuite/test/make Makefile.rules

[lldb] fix Makefile cross platform macros (#183131)

This patch fixes cross platform Makefile.rules macros and adds the
`ECHO_TO_EXISTING_FILE` macros.

Using `echo` in a macro to write to a file had quoting issues.

This is a reland of https://github.com/llvm/llvm-project/issues/183090.
DeltaFile
+6-4lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+6-41 files

LLVM/project 28c34edclang/include/clang/AST Attr.h, clang/include/clang/Sema Sema.h

[clang] Check upperbound for attribute param index (#180424)

Fixes #176638

The `ParamIdx` class encodes attribute's parameter indexes in 30 bits,
check if assignments overflow and issue an "attribute parameter out of
bounds" error in that case.
DeltaFile
+5-1clang/include/clang/AST/Attr.h
+3-2clang/include/clang/Sema/Sema.h
+5-0clang/test/Sema/nonnull.c
+13-33 files

LLVM/project d1e29a4libc/startup/linux irelative.h do_start.cpp, libc/startup/linux/aarch64 irelative.cpp

[libc] Enable ifunc support in static startup (#182841)

Resolves ifunc targets before `main()` runs in static libc

This enables static binaries to use ifunc-based dispatch during early
process startup, so optimized implementations can be selected based on
CPU features. Without this relocation step in startup, those targets are
not ready when program code begins executing.

This change:
- adds IRELATIVE relocation handling for x86_64, AArch64, ARMv7 and RISC-V,
- reads `AT_HWCAP` / `AT_HWCAP2` from auxv and passes them to resolvers
where required (notably AArch64),
- runs IRELATIVE processing after base-address discovery and before TLS
setup,
- adds integration tests for both the ifunc path and the no-ifunc path,
- Changed the load bias type for ptrdiff_t to intptr_t to align with
IRELATIVE handling, which uses intptr_t for load bias calculations.
DeltaFile
+48-0libc/test/integration/startup/linux/irelative_test.cpp
+47-0libc/startup/linux/riscv/irelative.cpp
+40-0libc/startup/linux/aarch64/irelative.cpp
+37-0libc/startup/linux/x86_64/irelative.cpp
+34-0libc/startup/linux/irelative.h
+18-3libc/startup/linux/do_start.cpp
+224-38 files not shown
+327-314 files

LLVM/project e0477ceclang/include/clang/Basic BuiltinsWebAssembly.def, clang/lib/Sema SemaExpr.cpp

[Sema] Set __builtin_wasm placeholder type to v* instead of i (#181146)

The `rewriteBuiltinFunctionDecl` was unconditionally rewriting
BuiltinFnTy to FunctionTy, by taking the type from the FDecl instead of
copying it from the Fn. That confused BuildResolvedCallExpr immediately
afterward, which sets `ResultTy = Context.BoolTy` if the type is
declared to be Function rather than BuiltinFn. Thus this only usually
matters when also using custom type checking, since otherwise this
eventually extracts the type from the FuncT and overwrites the type
extracted from the builtin, but that ability is disabled for builtins
with custom type checking marked. Either change here is sufficient alone
for the current __builtin_wasm declarations, but doing both changes
seemed more conservative for possible future builtins.

This was introduced originally in
b919c7d9eb8598b7f631c1edcd0b874bbdaf99d6.

Analysis assisted by Claude Sonnet 4.5
DeltaFile
+20-16clang/include/clang/Basic/BuiltinsWebAssembly.def
+11-9clang/lib/Sema/SemaExpr.cpp
+31-252 files

LLVM/project 603c315mlir/lib/Dialect/Linalg/TransformOps LinalgTransformOps.cpp, mlir/test/Dialect/Linalg transform-op-fuse.mlir

[MLIR][Transform] Allow any kind of transform param in mixed args (#183163)

Changes check to be on the interface so that `!transform.any_param`
typed values are accepted in addition to `!transform.param<...>`.
DeltaFile
+5-4mlir/test/Dialect/Linalg/transform-op-fuse.mlir
+2-1mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+7-52 files

LLVM/project 8259372llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp, mlir/test/Target/LLVMIR openmp-taskloop-no-context-struct.mlir

[OMPIRBuilder] Replace getAllocatedType with getAllocationSize (#181844)

Replace size queries using getTypeStoreSize(getAllocatedType()) with
getAllocationSize(DL) in createTaskloop, createTask, emitTargetTask, and
emitTargetTaskProxyFunction. For GEP type arguments in
emitNonContiguousDescriptor and emitOffloadingArrays, use the local
ArrayTy/PointerArrayType variables already in scope instead of
re-querying the alloca.

The store size of a struct is the same as the allocation size, so this
part should be NFC, and removes unnecessary uses of getAllocatedType, in
pursuit of the eventual deprecation of the getAllocatedType interface.

Co-authored-by: Claude Sonnet 4.5 <noreply at anthropic.com>
DeltaFile
+27-27llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+4-3mlir/test/Target/LLVMIR/openmp-taskloop-no-context-struct.mlir
+31-302 files

LLVM/project 27533c7lld/test/ELF/lto linker-script-symbols-ipo.ll, llvm/lib/CodeGen/AsmPrinter AsmPrinter.cpp

Reland "CodeGen: Emit .prefalign directives based on the prefalign attribute."

The result of the MachineFunction preferred alignment query is emitted
as a .prefalign directive if supported, otherwise it gets combined into
the minimum alignment.

Part of this RFC:
https://discourse.llvm.org/t/rfc-enhancing-function-alignment-attributes/88019

Reland of #155529 with fix for gold test case.

Reviewers: fmayer, nikic, arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/182929
DeltaFile
+27-0llvm/test/CodeGen/X86/prefalign.ll
+16-2llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+2-2llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll
+1-1lld/test/ELF/lto/linker-script-symbols-ipo.ll
+1-1llvm/test/tools/gold/X86/multiple-sections.ll
+47-65 files

LLVM/project b66fae3llvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN/PRE protected-field-ptr.ll

GVN: Inhibit PRE for llvm.protected.field.ptr.

Similar case to #151649.

Reviewers: fmayer, nikic

Pull Request: https://github.com/llvm/llvm-project/pull/182976
DeltaFile
+41-0llvm/test/Transforms/GVN/PRE/protected-field-ptr.ll
+6-0llvm/lib/Transforms/Scalar/GVN.cpp
+47-02 files

LLVM/project 5a69f1cclang-tools-extra/clang-tidy/performance StringViewConversionsCheck.cpp, clang-tools-extra/test/clang-tidy/checkers/performance string-view-conversions.cpp

[clang-tidy] Simplify and generalize `performance-string-view-conversions` (#182783)

This change teaches the check to detect the redundant `string_view ->
string -> string_view` conversion chain in places besides function calls
(notably, in constructor calls), all with less code.

No release note, because this check hasn't been released yet.
DeltaFile
+23-52clang-tools-extra/clang-tidy/performance/StringViewConversionsCheck.cpp
+48-0clang-tools-extra/test/clang-tidy/checkers/performance/string-view-conversions.cpp
+71-522 files

LLVM/project eee3db4libc/src/__support/CPP bit.h

[libc] Remove MSAN_UNPOISON from `bit_cast` and `bit_copy` (#183124)

The `MSAN_UNPOISON` calls were manually unpoisoning the source memory,
which can hide legitimate bugs where uninitialized memory is being
copied.

`MSAN_UNPOISON` should not be used in such wide spread utilities as
`bit_cast` and `bit_copy` but rather close to API boundary where
have no better way to avoid uninitialized bits.

* `MSAN_UNPOISON` was add to `bit_copy` with #165015, but it looks like
a copy-paste from `bit_cast`.
* `bit_cast` has it from #70067, but I can't find valid reproducer any
more. If it's still the issue, `MSAN_UNPOISON` \
  should move close the source of uninitialized values.
DeltaFile
+0-2libc/src/__support/CPP/bit.h
+0-21 files

LLVM/project 1465696llvm/lib/CodeGen MachineLoopUtils.cpp, llvm/test/CodeGen/Hexagon swp-peel-prolog-crash.mir

[MachinePipeliner] Fix crash during prolog peeling (#182189)

Fix crash during prolog peeling when loop preheader terminates with a
fallthrough conditional branch

The crash was happening due to the wrong preheader layout successor
being passed to `updateTerminator`; in general, the loop kernel will not
be the layout successor after prolog peeling. Fix this by passing the
right layout successor.
DeltaFile
+57-0llvm/test/CodeGen/Hexagon/swp-peel-prolog-crash.mir
+4-1llvm/lib/CodeGen/MachineLoopUtils.cpp
+61-12 files

LLVM/project 4627a21flang/lib/Lower/OpenMP Utils.cpp ClauseProcessor.cpp, flang/test/Lower/OpenMP task-affinity.f90

Rewrite functions in affinity utility functions with hlfir apis
DeltaFile
+124-125flang/lib/Lower/OpenMP/Utils.cpp
+69-46flang/test/Lower/OpenMP/task-affinity.f90
+23-47flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+5-3flang/lib/Lower/OpenMP/Utils.h
+221-2214 files

LLVM/project 9470ad7llvm/lib/CodeGen/AsmPrinter AsmPrinter.cpp

Add comment

Created using spr 1.3.6-beta.1
DeltaFile
+4-2llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+4-21 files

LLVM/project 25defd1llvm/lib/Support KnownFPClass.cpp, llvm/test/Transforms/Attributor nofpclass-fmul.ll

ValueTracking: Teach computeKnownFPClass that multiply by <=1 cannot overflow

If one operand is known not-inf, that can be propagated if the other operand is
known to have a magnitude <= 1.

This enables elimination of some inf checks inside the implementation of trig
functions when the input is known not-inf.
DeltaFile
+4-0llvm/lib/Support/KnownFPClass.cpp
+2-2llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+6-22 files

LLVM/project 726edfdllvm/test/Transforms/Attributor nofpclass-fmul.ll

baseline tests
DeltaFile
+52-0llvm/test/Transforms/Attributor/nofpclass-fmul.ll
+52-01 files

LLVM/project e36fe2eclang/lib/Headers ptrauth.h

[PAC][Headers] Silence warnings in `ptrauth.h` macro expansions (#183107)

This commit ensures that
`-Wgnu-statement-expression-from-macro-expansion` is not triggered when
`ptrauth.h` is included, but pointer authentication is not available.

Fixes #171461.
DeltaFile
+10-11clang/lib/Headers/ptrauth.h
+10-111 files

LLVM/project 262a678clang/test/CIR/CodeGen call-no-decl.c

[CIR][NFC] Fix Call no decl test (#183137)

Update the call-no-decl test file to ignore for parameter attribute `{llvm.noundef}`
DeltaFile
+4-3clang/test/CIR/CodeGen/call-no-decl.c
+4-31 files

LLVM/project e1be4dfllvm/lib/Target/Hexagon HexagonNewValueJump.cpp HexagonVLIWPacketizer.cpp, llvm/test/CodeGen/Hexagon disable-packetizer-nvj.ll

[Hexagon] Disable new value jumps when packetizer is disabled (#180615)

New value jumps require the feeder instruction to be in the same packet
as the consumer (.new) instruction. When --disable-packetizer is used,
each instruction is placed in its own packet, making it impossible to
satisfy this requirement.

Previously, using --disable-packetizer would cause an assertion failure
in the MCCodeEmitter: "Couldn't find producer". This change fixes the
crash by checking the DisablePacketizer flag in the NewValueJump pass
and skipping NVJ generation when packetization is disabled.
DeltaFile
+34-0llvm/test/CodeGen/Hexagon/disable-packetizer-nvj.ll
+5-1llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp
+2-3llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
+41-43 files

LLVM/project df5272allvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp SystemZHLASMAsmStreamer.h, llvm/test/CodeGen/SystemZ call-zos-02.ll

[SystemZ][z/OS] Show instruction encoding in HLASM output

This change adds the support to show instruction encoding as a comment
when emitting HLASM text. With this, the last 2 LIT tests migrate to
HLASM syntax.
DeltaFile
+83-55llvm/test/MC/SystemZ/insn-good-zos-pcrel.s
+102-0llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+7-5llvm/test/CodeGen/SystemZ/call-zos-02.ll
+4-0llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+196-604 files

LLVM/project 26eb674llvm/include/llvm/MC MCEncodingCommentHelper.h, llvm/lib/MC MCEncodingCommentHelper.cpp MCAsmStreamer.cpp

Refactor function

Move `AddEncodingComment()` as a free function into a new compilation
unit, and update the callers accordingly.
DeltaFile
+127-0llvm/lib/MC/MCEncodingCommentHelper.cpp
+2-98llvm/lib/MC/MCAsmStreamer.cpp
+4-87llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+44-0llvm/include/llvm/MC/MCEncodingCommentHelper.h
+1-0llvm/lib/MC/CMakeLists.txt
+178-1855 files

LLVM/project 7ee032bllvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp SystemZHLASMAsmStreamer.h

Fix formatting
DeltaFile
+5-5llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+1-1llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+6-62 files

LLVM/project a41cedalldb/test/API/commands/process/attach TestProcessAttach.py

[lldb] Make TestProcessAttach.py more reliable (#183141)

This test occasionally fails on GreenDragon. When the directory already
exists and we enter the exception block, the `os.errno` symbol is not
found because it was deprecated in Python 3.7.

Instead, replace `os.mkdir` with `os.makedirs` because it can handle a
directory already existing.
DeltaFile
+1-5lldb/test/API/commands/process/attach/TestProcessAttach.py
+1-51 files

LLVM/project 74f5708llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

ValueTracking: Move fmul constant special case to KnownFPClass
DeltaFile
+13-27llvm/lib/Analysis/ValueTracking.cpp
+20-0llvm/lib/Support/KnownFPClass.cpp
+4-0llvm/include/llvm/Support/KnownFPClass.h
+37-273 files

LLVM/project 334aa96lldb/packages/Python/lldbsuite/test/make Makefile.rules, lldb/test/API/tools/lldb-dap/conpty-drain TestDAP_conpty_drain.py main.c

Revert "[lldb] fix Makefile.rules cross platform macros (#183090)" (#183142)

DeltaFile
+0-32lldb/test/API/tools/lldb-dap/conpty-drain/TestDAP_conpty_drain.py
+0-11lldb/test/API/tools/lldb-dap/conpty-drain/main.c
+4-6lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+0-3lldb/test/API/tools/lldb-dap/conpty-drain/Makefile
+4-524 files

LLVM/project a8821e2llvm/lib/Target/AArch64 AArch64InstrInfo.td, llvm/test/CodeGen/AArch64 sminp-smaxp.ll uminp-umaxp.ll

[AArch64] optimize manual pairwise min/max (#182785)

Like https://github.com/llvm/llvm-project/pull/181549 but for min/max. I
believe that the behavior for `fminp`/`fmaxp` is correct based on

-
https://developer.arm.com/architectures/instruction-sets/intrinsics/vmax_f32
-
https://developer.arm.com/architectures/instruction-sets/intrinsics/vmaxv_f32

both using `FPMin` and `FPMAX` and 

```
defm FMAXP   : SIMDThreeSameVectorFP<1,0,0b110,"fmaxp", int_aarch64_neon_fmaxp>;
defm FMAX    : SIMDThreeSameVectorFP<0,0,0b110,"fmax", any_fmaximum>;
```

so using `any_fmaximum` for the patterns for `fmaxp` should be OK?
DeltaFile
+134-0llvm/test/CodeGen/AArch64/sminp-smaxp.ll
+134-0llvm/test/CodeGen/AArch64/uminp-umaxp.ll
+112-0llvm/test/CodeGen/AArch64/fminp-fmaxp.ll
+67-36llvm/lib/Target/AArch64/AArch64InstrInfo.td
+447-364 files

LLVM/project 130df05llvm/lib/Target/SPIRV SPIRVISelLowering.cpp

[SPIRV] Remove unreachable code from finalizeLowering
DeltaFile
+0-16llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
+0-161 files