LLVM/project 8ac51bclibc/include stdio.yaml sched.yaml, libc/include/sys mman.yaml socket.yaml

[libc][NFC] Lowercase standard identifiers in YAML files (#198854)

Update YAML files to use lowercase identifiers for standards.

In header.py, canonical identifiers for standards are explicitly defined
in lowercase and mapped to their pretty names for display. This change
ensures that all YAML files use the lowercase identifiers (posix, linux,
bsd, gnu) expected by the header generation tool.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+21-21libc/include/sys/mman.yaml
+17-17libc/include/sys/socket.yaml
+17-17libc/include/stdio.yaml
+12-12libc/include/sched.yaml
+11-11libc/include/termios.yaml
+8-8libc/include/string.yaml
+86-8614 files not shown
+132-13220 files

LLVM/project 1df5015llvm/lib/Target/ARM ARMLoadStoreOptimizer.cpp, llvm/test/CodeGen/ARM pr196779.ll

[ARM] Copy all flags when creating LDM (#197898)

This just adds the Operand instead of trying to handle flags
individually, similar to the AArch64LoadStoreOptimizer.

Fixes #196779
DeltaFile
+96-0llvm/test/CodeGen/ARM/pr196779.ll
+14-12llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+110-122 files

LLVM/project 348bde9clang/include/clang/Parse Parser.h, clang/lib/Parse ParseExprCXX.cpp ParseOpenACC.cpp

fix name diverge from main
DeltaFile
+5-5clang/lib/Parse/ParseExprCXX.cpp
+4-6clang/include/clang/Parse/Parser.h
+3-3clang/lib/Parse/ParseOpenACC.cpp
+12-143 files

LLVM/project 1229385compiler-rt/lib/builtins/cpu_model cpu_model.h AArch64CPUFeatures.inc, llvm/include/llvm/TargetParser AArch64CPUFeatures.inc

[compiler-rt][builtins] A few fixes cpu_model files (#198957)

- Fix typo in include guard with the word features
- Correct header in cpu_model.h header file and include guard after
  the file has been renamed
DeltaFile
+3-3compiler-rt/lib/builtins/cpu_model/cpu_model.h
+2-2llvm/include/llvm/TargetParser/AArch64CPUFeatures.inc
+2-2compiler-rt/lib/builtins/cpu_model/AArch64CPUFeatures.inc
+7-73 files

LLVM/project 15f3cf2llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.av.load.b128.ll

Merge branch 'main' into users/bassiounix/clang/c2y/if-decl
DeltaFile
+23,873-20,923llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+8,633-8,584llvm/test/CodeGen/Thumb2/mve-clmul.ll
+12,365-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+3,436-2,769llvm/test/CodeGen/AMDGPU/GlobalISel/sdivrem.ll
+2,801-2,109llvm/test/CodeGen/AMDGPU/GlobalISel/udivrem.ll
+52,351-43,1534,181 files not shown
+282,730-143,1564,187 files

LLVM/project b59adaaclang/test/C/C2y n3267.c

add more positive tests
DeltaFile
+7-0clang/test/C/C2y/n3267.c
+7-01 files

LLVM/project 0be65ballvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchMachineFunctionInfo.h, llvm/test/CodeGen/LoongArch musttail-indirect-args.ll musttail-call.ll

[LoongArch] Fix musttail with indirect arguments by forwarding incoming pointers

When a `musttail` call passes arguments indirectly (fp128 on LA32, i128
on LA32), the backend allocates a stack temporary and hands the callee a
pointer. The tail call deallocates the caller's frame, and the pointer
dangles.

Fix by forwarding the incoming indirect pointers instead. They point to
the caller's caller's frame, which stays valid after the tail call.
Forwarded formal parameters reuse the pointer directly; computed values
get stored into the incoming buffer first.

The pointers are saved in virtual registers (`CopyToReg`/`CopyFromReg`)
rather than SDValues. The SelectionDAG is cleared between basic blocks
and musttail calls can appear in non-entry blocks, so storing raw
SDValues across BBs is unsound (this was the bug that led to the revert
in 501417baa60f). The vreg save only fires when the function has
musttail calls; other functions see no codegen change.


    [3 lines not shown]
DeltaFile
+907-0llvm/test/CodeGen/LoongArch/musttail-indirect-args.ll
+183-44llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+20-0llvm/test/CodeGen/LoongArch/musttail-call.ll
+17-0llvm/lib/Target/LoongArch/LoongArchMachineFunctionInfo.h
+1,127-444 files

LLVM/project 74e6127llvm/lib/Target/RISCV RISCVSubtarget.h RISCVProcessors.td, llvm/test/CodeGen/RISCV jump-is-expensive.ll

[RISCV] Add TuneJumpIsExpensive (#191374)

We had `setJumpIsExpensive(true)` before 18.x but it was removed
in #74647. This feature allows users to tune the ISel behavior.

We have #80124 and #178394 landed, so it should be more flexible
to tune branches and selects now.

This is an alternative of #191158.
DeltaFile
+91-0llvm/test/CodeGen/RISCV/jump-is-expensive.ll
+4-0llvm/lib/Target/RISCV/RISCVSubtarget.h
+3-1llvm/lib/Target/RISCV/RISCVProcessors.td
+2-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+100-14 files

LLVM/project 3cf43f6llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV][P-ext] Split v4i16/v8i8 AND/OR/XOR on RV32. (#198449)

v2i32 is already scalarized by LegalizeVectorOps.
DeltaFile
+162-690llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+31-3llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+193-6932 files

LLVM/project 2306a98llvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV] Inline multiple small lambdas. NFC (#198878)

None of these lambdas are reused and they all seemed pretty simple to
inline.
DeltaFile
+19-30llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+19-301 files

LLVM/project cc382a6llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV][P-ext] Custom-lower SELECT for v4i16/v8i8 on RV32 (#198723)

SELECT was Expand for RV32 64-bit packed types, producing 40-80 lines of
stack-based per-element scalarization. Make it Custom for v4i16/v8i8 and
extend the existing isPExtPackedType branch in lowerSELECT to bitcast to
an integer of matching width: single-GPR types select on XLenVT
directly, while RV32 double-wide types select on i64 which
type-legalizes to two scalar selects on the i32 halves.

v2i32 is left to natural type-legalization since it splits cleanly into
two scalar i32 selects without a Custom hook.
DeltaFile
+14-114llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+11-7llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+25-1212 files

LLVM/project b3c0661llvm/lib/Transforms/Instrumentation AddressSanitizer.cpp

[NFC][ASan] Factor out ASan call insertion behind a single call (#198650)

The ASan pass directly injects function calls into the IR using
getOrInsertFunction() on every call site. Refactor the disparate call
sites behind an AsanFunctionInserter class. This allows us to add pre-
and post-processing logic for all inserted functions at once.

Signed-off-by: Emil Tsalapatis <emil at etsalapatis.com>
DeltaFile
+68-46llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+68-461 files

LLVM/project 577c2b6clang/include/clang/Basic BuiltinsMips.def, clang/test/CodeGen/Mips msa-const-ld.c

[Mips] Allow const pointers for the MSA load intrinsics (#193508)

This matches the prototypes of the GCC builtins.
DeltaFile
+24-0clang/test/CodeGen/Mips/msa-const-ld.c
+4-4clang/include/clang/Basic/BuiltinsMips.def
+28-42 files

LLVM/project 35aeb28flang-rt/lib/runtime exceptions.cpp, flang-rt/unittests/Runtime Exceptions.cpp CMakeLists.txt

[flang-rt] Silence -Wfenv-access in the runtime fenv wrappers (part 1) (#198692)

Upstream clang's commit 5f2bedca, PR #187860, enabled a warning that
fires whenever code calls a `<fenv.h>` / `<cfenv>` primitive without
enabling proper FP exception behavior. This caused warnings in compiling
flang-rt, which in turn caused certain buildsbots to fail with
`-Werror`.

This change enables FP trap behavior for parts of flang-rt that are
known to require it. The other parts will be addressed by a future
change.

Assisted-by: AI
DeltaFile
+144-0flang-rt/unittests/Runtime/Exceptions.cpp
+34-0flang/include/flang/Common/fp-control.h
+4-0flang-rt/lib/runtime/exceptions.cpp
+1-0flang-rt/unittests/Runtime/CMakeLists.txt
+183-04 files

LLVM/project 239fe44utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[Bazel] Fixes 0107b92 (#198939)

This fixes 0107b929b2dad594a9868250878e1d891791dd62.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+27-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+27-01 files

LLVM/project d2d8c53clang/lib/Driver/ToolChains AMDGPU.cpp AMDGPUOpenMP.cpp, clang/lib/Driver/ToolChains/Arch AMDGPU.cpp

[AMDGPU] Rewrite `-march` to `-mcpu` in the AMDGPU Toolchain (#198877)

Summary:
Pretty much every target uses either `-mcpu` or `-march` consistently.
AMDGPU has been accidentally using both for a while, mostly from some
fallout with the OpenMP Toolchain. This is too deep to pull out without
potentially disrupting users, but I want to at least contain it by
canonicalizing `-march` to `-mcpu` in the driver. This means we don't
need to bother checking both like every other target does.
DeltaFile
+8-5clang/lib/Driver/ToolChains/AMDGPU.cpp
+3-4clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
+1-5clang/lib/Driver/ToolChains/CommonArgs.cpp
+1-3clang/lib/Driver/ToolChains/Arch/AMDGPU.cpp
+13-174 files

LLVM/project a3da590flang-rt/test/Driver compare_iso_fortran_env_symbols.f90, llvm/runtimes CMakeLists.txt

[flang-rt] Fix ISO test not respecting real kind flags (#198922)

Summary:
The test previously did not account for CMake overrides, so we just grab
the file that's actually generated. `sort -u` should handle the case
where there's both a .so and .a.
DeltaFile
+6-6flang-rt/test/Driver/compare_iso_fortran_env_symbols.f90
+3-0llvm/runtimes/CMakeLists.txt
+9-62 files

LLVM/project 17e4140lldb/include/lldb/Symbol TypeSystem.h

[lldb] Make TypeSystem::m_sym_file atomic to fix data race (#198923)

SymbolFileCommon::GetTypeSystemForLanguage unconditionally writes this
pointer with `ts->SetSymbolFile(this)` on every lookup, which races with
concurrent reads from other threads.

The race is benign in practice: there is exactly one SymbolFile per
Module, so every writer stores the same pointer, but it is still
undefined behavior under the C++ memory model.

Make the field std::atomic<SymbolFile *> and turn SetSymbolFile into a
compare-exchange that asserts a TypeSystem is never rebound to a
different SymbolFile, documenting the invariant that lets us get away
with this.

The alternative is to have the SymbolFile pointer passed in through the
constructor, but that would require updating a bunch of call sites,
including various plugin interfaces.

Found by ThreadSanitizer as part of #197792.
DeltaFile
+27-5lldb/include/lldb/Symbol/TypeSystem.h
+27-51 files

LLVM/project 3a25cb1llvm/lib/CodeGen InlineSpiller.cpp

More and more refactoring.
DeltaFile
+12-4llvm/lib/CodeGen/InlineSpiller.cpp
+12-41 files

LLVM/project 480a6e0llvm/test/CodeGen/DirectX/DebugInfo di-subprogram.ll

Adjust test after merged PRs.
DeltaFile
+4-1llvm/test/CodeGen/DirectX/DebugInfo/di-subprogram.ll
+4-11 files

LLVM/project f4caa0allvm/lib/Target/AMDGPU AMDGPU.td GCNSubtarget.cpp, llvm/test/CodeGen/AMDGPU gfx12-5-generic-no-xnack.ll

[AMDGPU] Remove unsupported feature by gfx12-5-generic target (#198437)

Co-authored-by: Shilei Tian <i at tianshilei.me>
Co-authored-by: Chinmay Deshpande <chdeshpa at amd.com>
DeltaFile
+8-3llvm/lib/Target/AMDGPU/AMDGPU.td
+9-0llvm/test/CodeGen/AMDGPU/gfx12-5-generic-no-xnack.ll
+4-0llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
+21-33 files

LLVM/project 4e0d751llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.av.load.b128.ll

Merge branch 'main' into users/chenshanzhi/AArch64-TTI-getTgtMemIntrinsic
DeltaFile
+23,873-20,923llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+8,633-8,584llvm/test/CodeGen/Thumb2/mve-clmul.ll
+12,365-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+1,243-8,768llvm/test/CodeGen/X86/vector-replicaton-i1-mask.ll
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+62,491-38,2755,625 files not shown
+425,957-192,4315,631 files

LLVM/project 4cdb2bdllvm/lib/Transforms/AggressiveInstCombine AggressiveInstCombine.cpp, llvm/test/Transforms/AggressiveInstCombine popcount.ll

[AggressiveInstCombine] Recognizing tail truncation in the popcount pattern (#198658)

We're currently able to recognize the following popcount pattern
```
int popcnt(unsigned x) {
 x = x - ((x >> 1) & 0x55555555);
 x = x - 3*((x >> 2) & 0x33333333);
 x = (x + (x >> 4)) & 0x0F0F0F0F;
 x = x + (x >> 8);
 x = x + (x >> 16);
 return x & 0x0000003F;
}
```
but if a truncation follows right after the last AND instruction:
```
int16_t popcnt(unsigned x) {
 x = x - ((x >> 1) & 0x55555555);
 x = x - 3*((x >> 2) & 0x33333333);
 x = (x + (x >> 4)) & 0x0F0F0F0F;

    [12 lines not shown]
DeltaFile
+127-0llvm/test/Transforms/AggressiveInstCombine/popcount.ll
+26-7llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+153-72 files

LLVM/project bf1fca2clang/test/AST ast-dump-lambda-json.cpp ast-dump-template-json-win32-mangler-crash.cpp, lldb/tools/lldb-dap/extension package-lock.json

Merge branch 'users/hvdijk/aaw-emitmdnodeannot' into users/hvdijk/dxilprettyprinter-ir-printing
DeltaFile
+23,873-20,923llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+12,365-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+3,903-0llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion.ll
+2,504-1,285lldb/tools/lldb-dap/extension/package-lock.json
+0-3,387clang/test/AST/ast-dump-lambda-json.cpp
+7-3,217clang/test/AST/ast-dump-template-json-win32-mangler-crash.cpp
+42,652-28,8121,867 files not shown
+110,110-56,2501,873 files

LLVM/project 6799f69lldb/source/Host/macosx/objcxx HostInfoMacOSX.mm

Revert "[LLDB] Add a progress event to xcrun invocations (#198931)" (#198945)

This change requires Host link against Core, and it cannot do that; it
may only link in Utility. Reverting so Adrian can decide what to do.

This reverts commit 5c63509f4cc356639d9c4067e0812c2312689363.
DeltaFile
+0-8lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+0-81 files

LLVM/project cd2b962clang/test/AST ast-dump-lambda-json.cpp ast-dump-template-json-win32-mangler-crash.cpp, lldb/tools/lldb-dap/extension package-lock.json

Merge branch 'main' into users/hvdijk/aaw-emitmdnodeannot
DeltaFile
+23,873-20,923llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+12,365-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+3,903-0llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion.ll
+2,504-1,285lldb/tools/lldb-dap/extension/package-lock.json
+0-3,387clang/test/AST/ast-dump-lambda-json.cpp
+7-3,217clang/test/AST/ast-dump-template-json-win32-mangler-crash.cpp
+42,652-28,8121,867 files not shown
+110,110-56,2501,873 files

LLVM/project 84de374.github/workflows libc-shared-tests.yml libc-fullbuild-tests.yml

[Github] Add timeouts to libc tests (#198934)

None of these jobs do not take anywhere close to the six hour timeout
that Github uses by default. Set timeouts that are 2-3x the typical job
runtime so that if there is a test/build step that hangs indefinitely,
the job times out in a reasonable amount of time and does not hold any
resources that could be used elsewhere.

This should not impact any jobs that do not hang, will not change the
result of jobs that do hang, and means we can more effectively deal with
cases like today where tests were hanging, from a resource perspective.

This is also standard in some other workflows like the main premerge
workflow definition.
DeltaFile
+2-0.github/workflows/libc-shared-tests.yml
+1-0.github/workflows/libc-fullbuild-tests.yml
+1-0.github/workflows/libc-freebsd-vm-tests.yml
+1-0.github/workflows/libc-overlay-tests.yml
+5-04 files

LLVM/project c25924fllvm/lib/Analysis InstCount.cpp, llvm/lib/Passes PassBuilderPipelines.cpp PassRegistry.def

Add InstCount Pass Before Optimization (#198874)

This way we can count instructions before the optimization pipeline for
analysis sake
DeltaFile
+49-9llvm/lib/Analysis/InstCount.cpp
+41-0llvm/test/Analysis/InstCount/pipeline.ll
+36-3llvm/lib/Passes/PassBuilderPipelines.cpp
+1-7llvm/test/Analysis/InstCount/instcount.ll
+6-1llvm/lib/Passes/PassRegistry.def
+5-0llvm/lib/Passes/PassBuilder.cpp
+138-201 files not shown
+142-217 files

LLVM/project dec3552llvm/include/llvm/CodeGen MachineFunction.h, llvm/lib/CodeGen MachineFunction.cpp

[AMDGPU][MC] Replace shifted registers in CFI instructions

Change-Id: I0d99e9fe43ec3b6fecac20531119956dca2e4e5c
DeltaFile
+67-67llvm/test/CodeGen/AMDGPU/sgpr-spill-overlap-wwm-reserve.mir
+33-0llvm/lib/MC/MCDwarf.cpp
+15-15llvm/test/CodeGen/AMDGPU/dwarf-multi-register-use-crash.ll
+10-0llvm/lib/CodeGen/MachineFunction.cpp
+4-4llvm/test/CodeGen/AMDGPU/debug-frame.ll
+4-0llvm/include/llvm/CodeGen/MachineFunction.h
+133-865 files not shown
+143-9011 files

LLVM/project 9294b22llvm/lib/Target/AMDGPU SIFrameLowering.cpp SIMachineFunctionInfo.h, llvm/test/CodeGen/AMDGPU amdgpu-spill-cfi-saved-regs.ll

[AMDGPU] Implement -amdgpu-spill-cfi-saved-regs

These spills need special CFI anyway, so implementing them directly
where CFI is emitted avoids the need to invent a mechanism to track them
from ISel.

Change-Id: If4f34abb3a8e0e46b859a7c74ade21eff58c4047
Co-authored-by: Scott Linder scott.linder at amd.com
Co-authored-by: Venkata Ramanaiah Nalamothu VenkataRamanaiah.Nalamothu at amd.com
DeltaFile
+2,926-0llvm/test/CodeGen/AMDGPU/amdgpu-spill-cfi-saved-regs.ll
+12-0llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+10-0llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+9-0llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+2-0llvm/lib/Target/AMDGPU/SIRegisterInfo.h
+2,959-05 files