LLVM/project 1bd6f66llvm/include/llvm/Transforms/Utils LowerVectorIntrinsics.h, llvm/lib/CodeGen PreISelIntrinsicLowering.cpp TargetLoweringBase.cpp

Revert "[PreISelIntrinsicLowering] Expand binary elementwise intrinsics (#193552) (#193580) (#193990)

This reverts commit a1d11348aba4b70295ef9ada4a13a722455165d3.

Two problems have been identified:
- The expansion for powi was functionally wrong - the second argument
stales scalar even when the first is a vector.
- AArch64 uses the Expand option on libcalls to select vector libcalls
in some cases. The test coverage for this uses -start-after which
happens to miss this pass.
DeltaFile
+0-167llvm/test/Transforms/PreISelIntrinsicLowering/RISCV/expand-fp-math-binary.ll
+0-95llvm/test/Transforms/PreISelIntrinsicLowering/AArch64/expand-fp-math-binary.ll
+0-55llvm/lib/Transforms/Utils/LowerVectorIntrinsics.cpp
+0-16llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+0-8llvm/lib/CodeGen/TargetLoweringBase.cpp
+0-4llvm/include/llvm/Transforms/Utils/LowerVectorIntrinsics.h
+0-3456 files

LLVM/project 0f861ecmlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/lib/Dialect/LLVMIR/IR NVVMDialect.cpp

[MLIR][NVVM] Add `nvvm.cos` OP (#193792)

Implement `nvvm.cos` with ftz flag
DeltaFile
+15-0mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+15-0mlir/test/Dialect/LLVMIR/nvvm-transcendentals.mlir
+14-0mlir/test/Target/LLVMIR/nvvm/transcendentals.mlir
+10-0mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+54-04 files

LLVM/project 0642d03mlir/include/mlir/Dialect/LLVMIR NVVMOps.td

[MLIR][NVVM] Remove ptx version for consistency (#193991)
DeltaFile
+2-2mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+2-21 files

LLVM/project cd4ac81llvm/test/Transforms/SLPVectorizer/RISCV basic-strided-loads.ll

[SLP] Add new test for widened strided loads of > i8 width (#193901)

Currently we don't vectorize into strided loads as expected.
DeltaFile
+213-0llvm/test/Transforms/SLPVectorizer/RISCV/basic-strided-loads.ll
+213-01 files

LLVM/project 94cdc55mlir/lib/Dialect/XeGPU/Transforms XeGPUWgToSgDistribute.cpp, mlir/test/Dialect/XeGPU xegpu-wg-to-sg-unify-ops.mlir

[MLIR][XeGPU] Remove use-by-broadcast-only restriction for ShapeCast op in Wg-to-Sg distribution pass (#193640)

The WgToSgVectorShapeCastOp pattern previously required that
vector.shape_cast operations expanding unit dimensions could only be
used by vector.broadcast operations. This constraint was not necessary
anymore after the recent refectory.
DeltaFile
+24-0mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+0-11mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp
+24-112 files

LLVM/project 87a9cbacompiler-rt/cmake/Modules AllSupportedArchDefs.cmake, compiler-rt/lib/tysan tysan_platform.h

[compiler-rt][TySan] Add Hexagon target support (#191603)

Add shadow memory mapping for Hexagon (32-bit architecture) and enable
the TySan build for the Hexagon target.

Hexagon uses a 4-byte shadow entry (PtrShift=2) with the shadow region
at 0x80000000-0xBFFFFFFF (1GB). A 28-bit mask (kAppMemMsk) covers 256MB
of app address space; addresses differing only in bits 28-31 alias in
the shadow. kAppAddr is set to 0xC0000000 to size the mmap to exactly
the 1GB shadow region.
DeltaFile
+14-0compiler-rt/lib/tysan/tysan_platform.h
+1-1compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+15-12 files

LLVM/project 6ab7fcallvm/lib/IR AutoUpgrade.cpp, llvm/test/Bitcode upgrade-aarch64-sve-intrinsics.ll

fixup! Fix MLIR and add autoupgrade code and test
DeltaFile
+10-0llvm/test/Bitcode/upgrade-aarch64-sve-intrinsics.ll
+4-4mlir/include/mlir/Dialect/ArmSVE/IR/ArmSVE.td
+7-0llvm/lib/IR/AutoUpgrade.cpp
+1-1mlir/test/Target/LLVMIR/arm-sve.mlir
+22-54 files

LLVM/project b093148libc/shared/math dmulf128.h dmull.h, libc/src/__support/math dmulf128.h dmull.h

[libc][math] Refactor dmul family to header-only (#182151)

Refactors the dmul math family to be header-only.

Closes https://github.com/llvm/llvm-project/issues/182150

Target Functions:
  - dmulf128
  - dmull
DeltaFile
+31-0libc/src/__support/math/dmulf128.h
+28-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+29-0libc/shared/math/dmulf128.h
+25-0libc/src/__support/math/dmull.h
+23-0libc/shared/math/dmull.h
+19-0libc/src/__support/math/CMakeLists.txt
+155-17 files not shown
+173-1313 files

LLVM/project 25a035dclang/lib/AST/ByteCode Interp.h, clang/test/AST/ByteCode c.c

[clang][bytecode] Reject float-to-int casts on non-numbers (#193968)
DeltaFile
+6-0clang/lib/AST/ByteCode/Interp.h
+2-0clang/test/AST/ByteCode/c.c
+8-02 files

LLVM/project 0899273llvm/lib/Transforms/Vectorize LoopVectorize.cpp

[VPlan] Use early continue in ::buildVPlansWithVPRecipes (NFC). (#193979)

Reduce nesting by using early continue, split off from
https://github.com/llvm/llvm-project/pull/192868
DeltaFile
+25-22llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+25-221 files

LLVM/project 4837b0aclang/lib/Analysis/LifetimeSafety Checker.cpp, clang/test/Sema warn-lifetime-safety-suggestions.cpp

[LifetimeSafety] Suppress suggestion/inference for moved loans (#193899)

Fixes https://github.com/llvm/llvm-project/issues/193747
DeltaFile
+17-0clang/test/Sema/Inputs/lifetime-analysis.h
+17-0clang/test/Sema/warn-lifetime-safety-suggestions.cpp
+9-4clang/lib/Analysis/LifetimeSafety/Checker.cpp
+43-43 files

LLVM/project 785d724llvm/lib/Target/AMDGPU VOPDInstructions.td, llvm/test/MC/Disassembler/AMDGPU gfx1250_dasm_vopd3_unused_operands.txt

[AMDGPU][Disassembler] Permit unneeded VOPD3 operands to be non-zero (#193974)

Use ? instead of 0 in the tablegen definitions for those unused operands
of VOPD3 instructions.
This enables the instruction to be disassembled regardless of what bits
are in those fields, which helps diagnose broken code. Previously, the
disassembler would reject these.
DeltaFile
+36-0llvm/test/MC/Disassembler/AMDGPU/gfx1250_dasm_vopd3_unused_operands.txt
+4-4llvm/lib/Target/AMDGPU/VOPDInstructions.td
+40-42 files

LLVM/project c92bf56lldb/docs/use aarch64-linux.md, lldb/source/Plugins/ABI/AArch64 ABISysV_arm64.cpp

[lldb][AArch64][Linux] Rename "por" register to "por_el0" (#193983)

As agreed with my Arm colleagues working on GDB.

The suffix means we are matching the architectural name exactly, and
reducing confusion if you're
debuging multiple exception levels where there could be por_el<N> as
well.

In the process of updating the tests I found some
"register read" output has changed alignment so I
have fixed that too.
DeltaFile
+29-21lldb/source/Plugins/Process/Utility/RegisterFlagsDetector_arm64.cpp
+11-11lldb/test/API/linux/aarch64/permission_overlay/TestAArch64LinuxPOE.py
+11-10lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp
+6-6lldb/docs/use/aarch64-linux.md
+4-4lldb/test/API/linux/aarch64/permission_overlay/main.c
+3-3lldb/source/Plugins/Process/Utility/RegisterFlagsDetector_arm64.h
+64-553 files not shown
+67-589 files

LLVM/project 52534a1clang/lib/AST StmtProfile.cpp, clang/test/Modules callable-require-clause-merge.cppm polluted-operator.cppm

Revert "[C++20] [Modules] Don't profiling the callee of CXXFoldExpr (#190732)" (#193975)

This reverts commit 4c2e49dc5ce3125be9fb07dcefe9be970ce739ec.

See the discussion in https://github.com/llvm/llvm-project/pull/193885
for detail
DeltaFile
+0-35clang/test/Modules/callable-require-clause-merge.cppm
+1-29clang/lib/AST/StmtProfile.cpp
+7-0clang/test/Modules/polluted-operator.cppm
+8-643 files

LLVM/project f1f2022libc/docs CMakeLists.txt, libc/docs/headers index.rst

[libc][docs] Add sys/uio.h implementation status (#122006) (#193980)

Add sys/uio.h implementation-status docs to llvm-libc.
DeltaFile
+5-0libc/utils/docgen/sys/uio.yaml
+1-0libc/docs/CMakeLists.txt
+1-0libc/docs/headers/index.rst
+7-03 files

LLVM/project 2168f4bflang/test/Lower pointer-assignments.f90 pointer-association-polymorphic.f90

[flang][NFC] Converted five tests from old lowering to new lowering (part 48) (#193889)

Tests converted from test/Lower: pointer-args-caller.f90,
pointer-assignments.f90, pointer-association-polymorphic.f90,
pointer-default-init.f90, pointer-disassociate.f90
DeltaFile
+159-146flang/test/Lower/pointer-assignments.f90
+66-86flang/test/Lower/pointer-association-polymorphic.f90
+38-36flang/test/Lower/pointer-disassociate.f90
+38-27flang/test/Lower/pointer-args-caller.f90
+5-4flang/test/Lower/pointer-default-init.f90
+306-2995 files

LLVM/project c49b177clang-tools-extra/clangd ModulesBuilder.cpp, clang-tools-extra/clangd/unittests PrerequisiteModulesTest.cpp

[clangd] [C++20] [Modules] Introduce GC for clangd built modules (#193973)

This patch introduces simple GC for clangd built module files to avoid
the clangd built module cache to increase infinitely.

The strategy is, in a clangd built module file cache, if the clangd
built module (we think all PCM files in clangd cache are built by
clangd) was not accessed in a time (by default 3 day, controlled by
--modules-builder-versioned-gc-threshold-seconds),clangd will remove it.

The strategy is not perfect. e.g., I heard in some systems, the atime
was forbid or not update. But given a trade off between usability and
maintainability. I feel the current stategy is fine.

AI assisted.
DeltaFile
+169-0clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
+89-0clang-tools-extra/clangd/ModulesBuilder.cpp
+258-02 files

LLVM/project 771440flibc/docs CMakeLists.txt, libc/docs/headers index.rst

[libc][docs] Add dlfcn.h implementation status (#122006) (#193972)

Add dlfcn.h implementation-status docs to llvm-libc.
DeltaFile
+21-0libc/utils/docgen/dlfcn.yaml
+1-0libc/docs/CMakeLists.txt
+1-0libc/docs/headers/index.rst
+23-03 files

LLVM/project c35ef8aflang/lib/Parser openmp-parsers.cpp, libclc CMakeLists.txt

Merge branch 'main' into users/usx95/04-24-shared_ptr_false_positive
DeltaFile
+10-10flang/lib/Parser/openmp-parsers.cpp
+1-1libclc/CMakeLists.txt
+11-112 files

LLVM/project 6c7d16clibclc CMakeLists.txt

[libclc] Use 'LLVM_DEFAULT_TARGET_TRIPLE' instead of 'LLVM_RUNTIMES_TARGET' (#193969)

Summary:
The 'LLVM_RUNTIMES_TARGET' variable is the raw value used by the LLVM
CMake. It can contain multilib arguments which will not compile when
used as a triple. The more canonical value is
`LLVM_DEFAULT_TARGET_TRIPLE`, which is used by flang-rt, libc, openmp,
etc.
DeltaFile
+1-1libclc/CMakeLists.txt
+1-11 files

LLVM/project 38c0b52clang/lib/Analysis/LifetimeSafety Checker.cpp

address comments
DeltaFile
+9-8clang/lib/Analysis/LifetimeSafety/Checker.cpp
+9-81 files

LLVM/project d76fcadclang/lib/Analysis/LifetimeSafety Checker.cpp

fix docs
DeltaFile
+2-2clang/lib/Analysis/LifetimeSafety/Checker.cpp
+2-21 files

LLVM/project 57d0dd3clang/lib/Analysis/LifetimeSafety Checker.cpp, clang/test/Sema warn-lifetime-safety-suggestions.cpp

shared_ptr_false_positive
DeltaFile
+17-0clang/test/Sema/Inputs/lifetime-analysis.h
+17-0clang/test/Sema/warn-lifetime-safety-suggestions.cpp
+4-0clang/lib/Analysis/LifetimeSafety/Checker.cpp
+38-03 files

LLVM/project 8e5b383flang/lib/Parser openmp-parsers.cpp

[flang][OpenMP] Rename dirSpec to spec in openmp-parsers.cpp, NFC (#193967)
DeltaFile
+10-10flang/lib/Parser/openmp-parsers.cpp
+10-101 files

LLVM/project 8baf335bolt/lib/Passes JTFootprintReduction.cpp, bolt/test/AArch64 unsupported-passes.test

[BOLT][AArch64] Refuse to run JTFootprintReduction pass (#193946)

JTFootprintReduction results in a no-op on AArch64. This is because it
emits createIJmp32Frag() which is unimplemented for AArch64 and is only
overridden by x86.

- Add a guard for non-x86
- Update unsupported-passes.test with expected error message
DeltaFile
+5-0bolt/lib/Passes/JTFootprintReduction.cpp
+2-1bolt/test/AArch64/unsupported-passes.test
+7-12 files

LLVM/project aca5d1eclang/include/clang/Analysis/Analyses/LifetimeSafety Loans.h, clang/include/clang/Basic DiagnosticGroups.td

[LifetimeSafety] Remerge "Add support for `new`/`delete`" (#193776)

This PR extends LifetimeSafety to support heap allocations via
`new`/`delete`.

# Contents

* Adds a new warning emitted for use-after-free.

* Renames `reportUseAfterFree` to `reportUseAfterScope`, since the old
name was misleading (the warnings are still called `use_after_scope`).

* Adds a new `AccessPath::Kind` value, `NewAllocation`, which is used
for loans issued from `new` allocations.

* Adds `VisitCXXNewExpr` and `VisitCXXDeleteExpr`, which handle loan
issuance and origin propagation for `new` and `delete`.

* Comes with extensive test coverage for the new features, including new

    [15 lines not shown]
DeltaFile
+235-0clang/test/Sema/warn-lifetime-safety.cpp
+50-0clang/test/Sema/warn-lifetime-safety-suggestions.cpp
+32-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+21-10clang/lib/Sema/SemaLifetimeSafety.h
+10-2clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+10-2clang/include/clang/Basic/DiagnosticGroups.td
+358-147 files not shown
+378-2013 files

LLVM/project 97b7ceeclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenCXX.cpp

[CIR] Introduce LocalInitOp, & lower static locals (#193576)

During an investigation of something else, I discovered that our
handling of static-local as a ctor/dtor on a GlobalOp meant that it
couldn't actually be initialized with reference to any local, parameter,
or member declarations. This is obviously problematic.

This patch instead introduces a `LocalInitOp`, which is an operation
that represents the location of initialization for the static local.
This is lowered during lowering-prepare, same as we did previously (in
fact, it uses basically the exact same lowering code, with some slight
modifications).

Lowering from AST itself splits slightly from global declarations, but
the two share implementation as closely as possible.

At the moment, this operation only works for static-locals, and has a
handful of asserts to do the same. It is intended that the
thread-local-storage use the exact same mechanism, with some slight
modifications to the lowering-prepare pass to introduce the different
init behavior.
DeltaFile
+571-90clang/test/CIR/CodeGen/static-local.cpp
+125-96clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+53-21clang/lib/CIR/CodeGen/CIRGenCXX.cpp
+64-2clang/include/clang/CIR/Dialect/IR/CIROps.td
+65-0clang/test/CIR/IR/invalid-static-local.cir
+42-0clang/test/CIR/IR/static-local.cir
+920-2096 files not shown
+993-21312 files

LLVM/project 242baabflang/lib/Parser openmp-parsers.cpp

[flang][OpenMP] Rename dirSpec to spec in openmp-parsers.cpp, NFC
DeltaFile
+10-10flang/lib/Parser/openmp-parsers.cpp
+10-101 files

LLVM/project ee4d927mlir/lib/Conversion/TosaToLinalg TosaToLinalg.cpp, mlir/test/Conversion/TosaToLinalg tosa-to-linalg-resize.mlir

[mlir][tosa] Fix integer bilinear (quantized) tosa.resize lowering to use floordivsi (#193821)

## Background

`tosa.resize` in bilinear integer (quantized) mode lowers to a
`linalg.generic`
body that, for each output pixel, computes a corresponding input
coordinate and
blends the four neighboring input pixels. The mapping is:

```
val   = out_coord * scale_d + offset
index = val / scale_n          // integer part — which input pixel to start from
delta = val - index * scale_n  // fractional part, scaled to [0, scale_n)
```

`delta` is the interpolation weight toward the next pixel. The bilinear
formula
(integer path) is:

    [133 lines not shown]
DeltaFile
+5-4mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-resize.mlir
+1-1mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
+6-52 files

LLVM/project b5d253cflang/test/Lower optional-value-caller.f90 nested-where.f90, flang/test/Lower/OpenMP/Todo omp-default-clause-inner-loop.f90

[flang][NFC] Converted five tests from old lowering to new lowering (part 47) (#193886)

Tests converted from test/Lower: namelist-common-block.f90,
nested-where.f90, nullify.f90,
OpenMP/Todo/omp-default-clause-inner-loop.f90, optional-value-caller.f90
DeltaFile
+235-294flang/test/Lower/optional-value-caller.f90
+28-304flang/test/Lower/nested-where.f90
+15-10flang/test/Lower/nullify.f90
+7-9flang/test/Lower/OpenMP/Todo/omp-default-clause-inner-loop.f90
+1-1flang/test/Lower/namelist-common-block.f90
+286-6185 files