LLVM/project 8ba3a21utils/bazel/llvm-project-overlay/libc BUILD.bazel

[BAZEL] Add missing hdr_errno_macros to __support_osutil_linux_syscal_wrappers_mmap (#197934)

This fixes 5d9e711.
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-01 files

LLVM/project 2ee8cecllvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Consolidate accumulating GCD functions (NFCI)
DeltaFile
+11-28llvm/lib/Analysis/DependenceAnalysis.cpp
+5-5llvm/include/llvm/Analysis/DependenceAnalysis.h
+16-332 files

LLVM/project b9c36c6llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Delete early return in accumulateCoefficientsGCD (NFCI)
DeltaFile
+0-5llvm/lib/Analysis/DependenceAnalysis.cpp
+0-51 files

LLVM/project 0f379fdllvm/test/CodeGen/Thumb2 mve-vld3.ll mve-vst3.ll

[ARM][MVE] Combine extract(bitcast(buildvec(extract))) (#196263)

Due to some of the lowering we have for buildvector to attempt to use fp
lanes efficiently under arm, we can end up with
extract(bitcast(BUILD_VECTOR(extract(bitcast(a)), ..))) that we can
convert into simpler extract(a).

This helps with node order changes.
DeltaFile
+218-183llvm/test/CodeGen/Thumb2/mve-vld3.ll
+139-153llvm/test/CodeGen/Thumb2/mve-vst3.ll
+103-117llvm/test/CodeGen/Thumb2/mve-laneinterleaving-cost.ll
+69-134llvm/test/CodeGen/Thumb2/mve-shuffle.ll
+28-36llvm/test/CodeGen/Thumb2/mve-vabdus.ll
+13-19llvm/test/CodeGen/Thumb2/mve-vld4.ll
+570-6426 files not shown
+622-67712 files

LLVM/project 906d74blldb/source/Plugins/ExpressionParser/Clang ClangExpressionParser.cpp, lldb/unittests/Host/common DiagnosticsRenderingTest.cpp

[lldb] fix single-character token not underlined correctly in diagnostics (#197658)
DeltaFile
+15-6lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+12-0lldb/unittests/Host/common/DiagnosticsRenderingTest.cpp
+27-62 files

LLVM/project 36e1633llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanConstruction.cpp, llvm/test/Transforms/LoopVectorize/AArch64 conditional-scalar-assignment-fold-tail.ll

[VPlan] Skip FindLast reductions with malformed blends. (#197900)

https://github.com/llvm/llvm-project/issues/197701 exposed a case where
we end up with an unsupported backedge select for FindLast reductions.

Replace unreachable with a bail out to avoid miscompile/crash.

Fixes https://github.com/llvm/llvm-project/issues/197701
DeltaFile
+29-0llvm/test/Transforms/LoopVectorize/AArch64/conditional-scalar-assignment-fold-tail.ll
+1-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-1llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+31-23 files

LLVM/project 0b681eellvm/test/Transforms/SLPVectorizer/X86 arith-mul-smulo.ll arith-add-saddo.ll

[SLP] Vectorize struct-returning intrinsics

Allow SLP to combine across lanes calls that return a literal struct
(llvm.sincos, llvm.*.with.overflow, llvm.frexp, ...) into a single
call returning a struct of vectors, by widening {T, T, ...} to
{<VF x T>, ...} via VectorTypeUtils and emitting extractvalue +
extractelement for external uses.

Original Pull Request: https://github.com/llvm/llvm-project/pull/195521

Reviewers: hiraditya, RKSimon, bababuck

Pull Request: https://github.com/llvm/llvm-project/pull/196756
DeltaFile
+549-615llvm/test/Transforms/SLPVectorizer/X86/arith-mul-smulo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-add-saddo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-add-uaddo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-sub-ssubo.ll
+449-615llvm/test/Transforms/SLPVectorizer/X86/arith-sub-usubo.ll
+429-615llvm/test/Transforms/SLPVectorizer/X86/arith-mul-umulo.ll
+2,774-3,6904 files not shown
+3,268-3,91310 files

LLVM/project 8b6731allvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange ninf.ll reduction2mem.ll

[LoopInterchange] Drop ninf from instructions involved in interchange
DeltaFile
+32-11llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+1-1llvm/test/Transforms/LoopInterchange/ninf.ll
+1-1llvm/test/Transforms/LoopInterchange/reduction2mem.ll
+34-133 files

LLVM/project 8aa6d51llvm/lib/Target/AArch64 AArch64SystemOperands.td, llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

[AArch64][llvm] Remove support for FEAT_MPAMv2_VID

`FEAT_MPAMv2_VID` instructions and system registers, as introduced
in change d30f18d2c, are being removed at this time, as they've been
removed from the latest Arm ARM, which doesn't preclude them returning
in some form in future.

Other system registers introduced with `FEAT_MPAMv2` are unaffected,
and these continue to be ungated, but since `+mpamv2` gating is now
empty, I'm removing this superfluous gating code.

Cherry-picked-from: a48159df9
DeltaFile
+5-86llvm/test/MC/AArch64/armv9.7a-mpamv2.s
+0-36llvm/lib/Target/AArch64/AArch64SystemOperands.td
+5-17llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+0-18llvm/test/MC/AArch64/armv9.7a-mpamv2-diagnostics.s
+2-12llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+0-8llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+12-1776 files not shown
+13-19512 files

LLVM/project ed2fda6mlir/lib/Conversion/ArithToSPIRV ArithToSPIRV.cpp, mlir/test/Conversion/ArithToSPIRV arith-to-spirv.mlir

[mlir][spirv] Convert arith.subui_extended to spirv.ISubBorrow (#197736)
DeltaFile
+19-16mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp
+27-0mlir/test/Conversion/ArithToSPIRV/arith-to-spirv.mlir
+10-0mlir/test/Target/SPIRV/arithmetic-ops.mlir
+56-163 files

LLVM/project d3c38cfllvm/lib/Target/ARM ARMISelLowering.cpp, llvm/test/CodeGen/Thumb2 mve-pred-const.ll

[ARM][MVE] Constant fold PREDICATE_CAST of 0 and 0xffff (#197832)

This allows us to fold away the vselect when we know that the condition
is all true or all false.
DeltaFile
+4-36llvm/test/CodeGen/Thumb2/mve-pred-const.ll
+11-0llvm/lib/Target/ARM/ARMISelLowering.cpp
+15-362 files

LLVM/project 17146dcclang/lib/Driver/ToolChains/Arch AArch64.cpp

[clang][AArch64][NFC] Match variable names to code style (#197918)

Follow up to 0ac83dccaf53f3a51714fd53b151314de1a13e48 / #197689.
DeltaFile
+6-6clang/lib/Driver/ToolChains/Arch/AArch64.cpp
+6-61 files

LLVM/project eec28baopenmp CMakeLists.txt, openmp/device CMakeLists.txt

[OpenMP] Fix missing install-openmp component (#197603)

Summary:
This pattern is consistent throughout all the runtimes and is what the
top-level `install-openmp-<triple>` corresponds to. It should be
provided and used.
DeltaFile
+10-9openmp/runtime/src/CMakeLists.txt
+9-0openmp/CMakeLists.txt
+4-2openmp/device/CMakeLists.txt
+2-2openmp/tools/archer/CMakeLists.txt
+2-1openmp/docs/CMakeLists.txt
+2-1openmp/tools/Modules/CMakeLists.txt
+29-154 files not shown
+34-1810 files

LLVM/project 6996e97llvm/test/CodeGen/AArch64 fptoi-256.ll

[AArch64] Delete llvm/test/CodeGen/AArch64/fptoi-256.ll (NFC) (#197896)

llvm/test/CodeGen/AArch64/fcvt-i256.ll has since been added with the
same and broader coverage.
DeltaFile
+0-11llvm/test/CodeGen/AArch64/fptoi-256.ll
+0-111 files

LLVM/project b152ea8libc/src/stdlib CMakeLists.txt

[libc] Disable GCC 12 waccess passes to fix ICE in environ_internal (#197916)

The waccess pass in GCC 12 consistently segmentation faults when
analyzing the memory allocations in environ_internal.cpp. This change
disables the relevant tree-waccess passes for this specific file,
avoiding the ICE without requiring intrusive code refactoring.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+3-1libc/src/stdlib/CMakeLists.txt
+3-11 files

LLVM/project 400c376lld/MinGW Driver.cpp Options.td, lld/docs ReleaseNotes.rst

[LLD] [MinGW] Implement --{push,pop}-state (#197748)

Implement `--push-state` and `--pop-state` for the MinGW lld driver.
Those options were already implemented by GNU ld for MinGW:
```
  --push-state                Push state of flags governing input file handling
  --pop-state                 Pop state of flags governing input file handling
```

This will align the MinGW frontend's options closer with those of the
ELF frontend and fix issues due to e.g. CMake misdetecting
`--push-state`/`--pop-state` support by accidentally querying the ELF
driver.

Fixes #131007.
DeltaFile
+18-0lld/MinGW/Driver.cpp
+8-0lld/test/MinGW/driver.test
+4-0lld/MinGW/Options.td
+4-0lld/docs/ReleaseNotes.rst
+34-04 files

LLVM/project d1bac63llvm/lib/Target/ARM ARMInstrInfo.td

[ARM] NOP should be mov r0, r0 on all not V6K, including regular V6 (#196625)

Otherwise, nop on armv6 but not v6k targets may not work.
DeltaFile
+3-2llvm/lib/Target/ARM/ARMInstrInfo.td
+3-21 files

LLVM/project b03b2ddllvm/lib/Transforms/Vectorize VPlanTransforms.cpp LoopVectorize.cpp

[VPlan] Move call widening decision to VPlan. (NFCI) (#195518)

This patch adds a new makeCallWideningDecisions transform which converts
Call VPInstructions to
VPWidenCallRecipe/VPWidenIntrinsicRecipe/VPReplicateRecipe depending on
their costs.

To compute the costs, static helpers are introduced to re-use the
existing VPlan cost model logic:
 * VPWidenIntrinsicRecipe::computeCallCost
 * VPReplicateRecipe::computeCallCost

The cost-model logic is still retained; we assert that the decisions
match to make sure we do not miss any edge cases. The legacy logic will
be removed in a follow-up.

PR: https://github.com/llvm/llvm-project/pull/195518
DeltaFile
+181-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+44-90llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+48-34llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+16-4llvm/lib/Transforms/Vectorize/VPlan.h
+19-0llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+2-12llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+310-1403 files not shown
+324-1479 files

LLVM/project d28372cllvm/test/Transforms/LoopInterchange ninf.ll

[LoopInterchange] Add test for poison can be produced due to ninf (NFC)
DeltaFile
+154-0llvm/test/Transforms/LoopInterchange/ninf.ll
+154-01 files

LLVM/project e984652llvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize/AArch64 cmp_cost.ll

[VPlan] Compute the cost for scalar cmp outside the vector region (#197146)

Currently we don't compute the cost of any scalar compares. Change this
to only avoid computing the cost if it's inside the vector region, as
compares that are used in the loop exit condition are handled by the
legacy cost model and this is the simplest way to avoid double-counting
those instructions.

This mainly affects the compare in the middle block, and accounting for
the cost of that can change the requred minimum trip count.
DeltaFile
+16-8llvm/test/Transforms/LoopVectorize/RISCV/partial-reduce-dot-product.ll
+16-8llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-div.ll
+11-11llvm/test/Transforms/LoopVectorize/X86/CostModel/vpinstruction-cost.ll
+12-7llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+7-7llvm/test/Transforms/LoopVectorize/AArch64/cmp_cost.ll
+8-4llvm/test/Transforms/LoopVectorize/RISCV/inloop-reduction.ll
+70-4512 files not shown
+102-6218 files

LLVM/project be582e4llvm/lib/CodeGen AtomicExpandPass.cpp, llvm/test/CodeGen/ARM atomic-load-store.ll

[AtomicExpand] Add bitcasts when expanding store atomic vector

AtomicExpand fails for aligned \`store atomic <n x T>\` because it
does not find a compatible library call. This change adds appropriate
ptrtoint + bitcast so that the call can be lowered, mirroring the
load-side handling from #148900.
DeltaFile
+100-7llvm/test/CodeGen/X86/atomic-load-store.ll
+98-0llvm/test/Transforms/AtomicExpand/X86/expand-atomic-non-integer.ll
+49-0llvm/test/CodeGen/ARM/atomic-load-store.ll
+4-2llvm/lib/CodeGen/AtomicExpandPass.cpp
+251-94 files

LLVM/project f3f1e6allvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange profitability-vectorization.ll delay-cachecost-calculation.ll

[LoopInterchange] Disable LoopCacheAnalysis-based heuristic by default
DeltaFile
+3-3llvm/test/Transforms/LoopInterchange/profitability-vectorization.ll
+1-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+1-1llvm/test/Transforms/LoopInterchange/delay-cachecost-calculation.ll
+1-1llvm/test/Transforms/LoopInterchange/lcssa-phi-outer-latch.ll
+1-1llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
+1-1llvm/test/Transforms/LoopInterchange/perserve-lcssa.ll
+8-91 files not shown
+9-107 files

LLVM/project 009784bllvm/test/Transforms/LoopInterchange profitability-vectorization.ll

address review comment
DeltaFile
+1-1llvm/test/Transforms/LoopInterchange/profitability-vectorization.ll
+1-11 files

LLVM/project 1dcfc1ellvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange dependency-all-eq.ll

[LoopInterchange] Change the cost model to interchange `[* =]`
DeltaFile
+30-53llvm/test/Transforms/LoopInterchange/dependency-all-eq.ll
+33-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+63-552 files

LLVM/project 4a3c027llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange dependency-all-eq.ll pr43176-move-to-new-latch.ll

[LoopInterchange] Relax legality check to accept more patterns
DeltaFile
+103-42llvm/test/Transforms/LoopInterchange/dependency-all-eq.ll
+15-0llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+8-6llvm/test/Transforms/LoopInterchange/pr43176-move-to-new-latch.ll
+4-6llvm/test/Transforms/LoopInterchange/inner-only-reductions.ll
+6-3llvm/test/Transforms/LoopInterchange/legality-check.ll
+4-4llvm/test/Transforms/LoopInterchange/large-nested-6d.ll
+140-611 files not shown
+140-697 files

LLVM/project 97f99bellvm/test/Transforms/LoopInterchange dependency-all-eq.ll

[LoopInterchange] Add test with dependency `[* =]` and `[= *]` (NFC)
DeltaFile
+117-0llvm/test/Transforms/LoopInterchange/dependency-all-eq.ll
+117-01 files

LLVM/project 57ba55fllvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange profitability-instorder.ll

[LoopInterchange] Take base pointer into account in profitability check
DeltaFile
+18-7llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+7-17llvm/test/Transforms/LoopInterchange/profitability-instorder.ll
+25-242 files

LLVM/project e6a6eebllvm/lib/Transforms/Scalar LoopInterchange.cpp

address review comments
DeltaFile
+16-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+16-21 files

LLVM/project 28a107bllvm/test/Transforms/LoopInterchange profitability-instorder.ll

[LoopInterchange] Add test for multiple accesses to same base ptr (NFC)
DeltaFile
+86-2llvm/test/Transforms/LoopInterchange/profitability-instorder.ll
+86-21 files

LLVM/project 8769836llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange profitability-instorder.ll

update
DeltaFile
+30-28llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+28-28llvm/test/Transforms/LoopInterchange/profitability-instorder.ll
+58-562 files