LLVM/project 2c74596llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp, mlir/test/Target/LLVMIR allocatable_gpu_reduction.mlir

[OMPIRBuilder] Hoist alloca's to entry blocks of compiler-emitted GPU reduction functions

Fixes a bug in GPU reductions when `-O0` was used to compile GPU
reductions. There were invalid memory accesses at runtime for the
following example:

```fortran
program test_array_reduction()
  integer :: red_array(1)
  integer :: i

  red_array = 0

  !$omp target teams distribute parallel do reduction(+:red_array)
  do i = 1, 100
    red_array(1) = red_array(1) + 4422
  end do
  !$omp end target teams distribute parallel do


    [10 lines not shown]
DeltaFile
+17-0mlir/test/Target/LLVMIR/allocatable_gpu_reduction.mlir
+6-0llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+23-02 files

LLVM/project b447f5dlldb/packages/Python/lldbsuite/test/tools/lldb-dap dap_server.py, lldb/test/API/tools/lldb-dap/unknown TestDAP_unknownRequest.py main.c

[lldb-dap] Add unknown request handler (#181109)

Added unknown request handler to avoid crash. Returning error in this
case looks better than stopping entire debug session.
DeltaFile
+35-0lldb/test/API/tools/lldb-dap/unknown/TestDAP_unknownRequest.py
+19-0lldb/tools/lldb-dap/Handler/UnknownRequestHandler.cpp
+4-6lldb/tools/lldb-dap/DAP.cpp
+9-0lldb/tools/lldb-dap/Handler/RequestHandler.h
+8-0lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+6-0lldb/test/API/tools/lldb-dap/unknown/main.c
+81-64 files not shown
+91-610 files

LLVM/project e0293fcopenmp/runtime/src/include ompx.h.var

[OFFLOAD] Add support for SPIRV to ompx (#179849)

After adding support to build device RTL for SPIRV, this PR will make an
ompx to use the DeviceRTL API when compiled for SPIRV
DeltaFile
+1-1openmp/runtime/src/include/ompx.h.var
+1-11 files

LLVM/project 741a4daclang/include/clang/Basic SourceLocation.h

[clang] Clarify SourceLocation and (Char)SourceRange docs (#177400)

The current documentation leaves some questions unanswered to me, which
I'm trying to clarify here.
1. It was unclear how SourceLocation differed when referring to the
character level vs. the token level. Turns out there is no such
difference, and SourceLocation always refers to characters. This should
be made explicit in the docs.
2. It was unclear in which cases (Char)SourceRange is inclusive
(containing the endpoint) or exclusive (ending before the endpoint).
From my reading of the docs and investigating the behavior of different
AST nodes' `getSourceLoc()` result and `Lexer::getSourceText()`,
SourceRange is always inclusive and CharSourceRange is inclusive only as
a TokenRange, and exclusive as a CharRange. This is also consistent
matches with the documentation of the clang::transformer::after()
function in RangeSelector.h, where the question of inclusive/exclusive
ranges came up first for me.
DeltaFile
+22-4clang/include/clang/Basic/SourceLocation.h
+22-41 files

LLVM/project aac8885clang/lib/Sema SemaCXXScopeSpec.cpp, clang/test/SemaCXX GH167120.cpp

[clang] NestedNameSpecifier typo correction fix (#181239)

This stops typo correction from considering template parameters as
candidates for a NestedNameSpecifier when it has a prefix itself.

I think this is better than the alternative of accepting these
candidates, but otherwise droping the prefix, because it seems more
far-fetched that someone would actually try to refer to a template
parameter this way.

Since this regression was never released, there are no release notes.

Fixes #167120
DeltaFile
+11-4clang/lib/Sema/SemaCXXScopeSpec.cpp
+5-0clang/test/SemaCXX/GH167120.cpp
+16-42 files

LLVM/project 8b47264llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Added assertion

Created using spr 1.3.7
DeltaFile
+2-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+2-01 files

LLVM/project c592866clang/docs ReleaseNotes.rst, clang/lib/Sema SemaExprCXX.cpp

[clang][Sema] Avoid assert when diagnosing address-space qualified new/delete (#178424)

### Whats the error

Clang could assert when diagnosing new or delete on types in
language-specific address spaces (e.g. OpenCL __local), instead of
emitting a normal error.

### Why it happened

The diagnostics used getAddressSpaceAttributePrintValue(), which assumes
target-specific address spaces and asserts for language-defined ones
like
OpenCL.

### Whats the Fix

Explicitly check for language defined address spaces in new/delete
diagnostics and emit the error directly, avoiding the crashing path, Add

    [2 lines not shown]
DeltaFile
+11-0clang/test/SemaCXX/address-space-new-delete.cpp
+4-3clang/lib/Sema/SemaExprCXX.cpp
+1-0clang/docs/ReleaseNotes.rst
+16-33 files

LLVM/project 655eddallvm/test/tools/llvm-objdump/MachO dis-symname.test, llvm/tools/llvm-objdump MachODump.cpp MachODump.h

[llvm-otool] Fix error messages to use -p instead of --dis-symname (#181225)

Also fixes llvm-objdump error messages to print --dis-symname instead of
single dash option.
DeltaFile
+14-2llvm/test/tools/llvm-objdump/MachO/dis-symname.test
+7-3llvm/tools/llvm-objdump/MachODump.cpp
+1-0llvm/tools/llvm-objdump/MachODump.h
+1-0llvm/tools/llvm-objdump/llvm-objdump.cpp
+23-54 files

LLVM/project cf95ad1llvm/test/tools/llubi int_arith.ll divrem_ub2.ll, llvm/tools/llubi/lib Interpreter.cpp Context.cpp

[llubi] Add support for integer arithmetic ops (#181224)

DeltaFile
+358-7llvm/tools/llubi/lib/Interpreter.cpp
+147-0llvm/test/tools/llubi/int_arith.ll
+24-2llvm/tools/llubi/lib/Context.cpp
+12-0llvm/test/tools/llubi/divrem_ub2.ll
+12-0llvm/test/tools/llubi/divrem_ub1.ll
+10-0llvm/test/tools/llubi/divrem_ub4.ll
+563-92 files not shown
+582-98 files

LLVM/project 7f932c2llvm/lib/Frontend/Offloading OffloadWrapper.cpp

[OffloadWrapper] Avoid unnecessary zero-index GEPs

These are no-ops that will get optimized away.
DeltaFile
+3-14llvm/lib/Frontend/Offloading/OffloadWrapper.cpp
+3-141 files

LLVM/project a55fbabllvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanAnalysis.cpp, llvm/test/Transforms/LoopVectorize pr154045-dont-fold-extractelement-livein.ll

[VPlan] Run initial recipe simplification on VPlan0. (#176828)

In some cases, LV gets simplifyable IR as input. Directly apply
simplifications on the initial VPlan0 to avoid vectorization in cases
where the loop body can be folded away.

Using the end-to-end pipeline, this is relatively rare, but when
reducing test cases, the reduction often ends up with cases with trivial
folds. Rejecting those will result in more robust & realistic test
cases.

As follow-up, I also plan to add initial dead recipe removal.

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

PR: https://github.com/llvm/llvm-project/pull/176828
DeltaFile
+10-250llvm/test/Transforms/LoopVectorize/X86/cost-conditional-branches.ll
+10-91llvm/test/Transforms/LoopVectorize/X86/pr141968-instsimplifyfolder.ll
+32-10llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+14-0llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+0-13llvm/test/Transforms/LoopVectorize/pr154045-dont-fold-extractelement-livein.ll
+5-1llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+71-3654 files not shown
+76-37410 files

LLVM/project fe413f7llvm/lib/Analysis ScalarEvolution.cpp, llvm/test/Transforms/IndVarSimplify turn-to-invariant.ll

[SCEV] Discard samesign when analyzing loop invariant exits (#181171)

If the predicate has samesign set, we could either perform the checks
with the unsigned predicate and return and unsigned invariant predicate,
or we could perform them with the signed predicate and return a signed
invariant predicate. The current implementation can end up mixing both,
using a signed predicate for one check and an unsigned one for the
other.

Avoid this by dropping the samesign flag.

Fixes https://github.com/llvm/llvm-project/issues/180870.
DeltaFile
+44-0llvm/test/Transforms/IndVarSimplify/turn-to-invariant.ll
+6-1llvm/lib/Analysis/ScalarEvolution.cpp
+50-12 files

LLVM/project e0182eboffload CMakeLists.txt

[OFFLOAD] Fix issue where host plugin is added twice to the plugin list (#181346)

DeltaFile
+5-1offload/CMakeLists.txt
+5-11 files

LLVM/project c2b69b1clang/lib/AST/ByteCode InterpBuiltin.cpp, clang/test/AST/ByteCode builtin-functions.cpp

[clang][bytecode] Do a full CheckLoad in builtin_memcmp() (#181337)

This handles unknown size arrays as well and prints the expected
diagnostics.
DeltaFile
+1-5clang/lib/AST/ByteCode/InterpBuiltin.cpp
+4-0clang/test/AST/ByteCode/builtin-functions.cpp
+5-52 files

LLVM/project d7d4e4alibcxx/include/__charconv from_chars_integral.h

[libc++][NFC] Don't use copy_n to copy a single integer in __sign_combinator (#181119)

We can just assign the integer directly.
DeltaFile
+1-4libcxx/include/__charconv/from_chars_integral.h
+1-41 files

LLVM/project 0ad941allvm/lib/Target/WebAssembly WebAssemblyTargetTransformInfo.cpp WebAssemblyTargetTransformInfo.h, llvm/test/Analysis/CostModel/WebAssembly extract-last-active.ll

Revert "Revert "[WebAssembly] Mark extract.last.active as having invalid cost."" (#181342)

Reverts llvm/llvm-project#180942

Looks like something changed the cost model. Will investigate later.
DeltaFile
+0-26llvm/test/Analysis/CostModel/WebAssembly/extract-last-active.ll
+13-0llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
+4-0llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
+17-263 files

LLVM/project a7a249flibcxx/include/__filesystem path.h

[libc++][NFC] Simplify some overloads in fs::path a bit (#181053)

We can use `if constexpr` instead, removing a bit of code and making
things easier to read.
DeltaFile
+13-30libcxx/include/__filesystem/path.h
+13-301 files

LLVM/project 900fac7clang/lib/AST/ByteCode InterpBuiltin.cpp, clang/test/AST/ByteCode builtin-functions.cpp

[clang][bytecode] Check strlen element size (#181333)

We're otherwise running into an assertion later, so do the check early.
DeltaFile
+4-1clang/test/AST/ByteCode/builtin-functions.cpp
+2-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+6-12 files

LLVM/project b58a31doffload CMakeLists.txt, offload/liboffload/src OffloadImpl.cpp

[OFFLOAD] Add support for host offloading device (#177307)

The purpose of this PR is to add support of host as an offloading device
to liboffload. Both OpenMP and sycl support offloading to a host as
their normal workflow and therefore would require such capability from
liboffload library.
DeltaFile
+195-0offload/unittests/OffloadAPI/device/olGetHostInfo.cpp
+17-100offload/liboffload/src/OffloadImpl.cpp
+43-8offload/plugins-nextgen/host/src/rtl.cpp
+4-2offload/CMakeLists.txt
+2-1offload/unittests/OffloadAPI/CMakeLists.txt
+261-1115 files

LLVM/project 0f8325cllvm/lib/Target/WebAssembly WebAssemblyTargetTransformInfo.cpp WebAssemblyTargetTransformInfo.h, llvm/test/Analysis/CostModel/WebAssembly extract-last-active.ll

Revert "[WebAssembly] Mark extract.last.active as having invalid cost." (#180942)

The failures should have been resolved with #180290 (which also added
WebAssembly tests).

This reverts commit 811fb223af2b3e2d68c99b346f4b75dcf3de3417.
DeltaFile
+26-0llvm/test/Analysis/CostModel/WebAssembly/extract-last-active.ll
+0-13llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
+0-4llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
+26-173 files

LLVM/project 2435a68clang/lib/AST/ByteCode Descriptor.cpp, clang/test/AST/ByteCode vectors.cpp

[clang][bytecode] Strip atomicity in Descriptor::getElemQualType() (#181328)

The later check for VectorType fails otherwise.
DeltaFile
+4-0clang/test/AST/ByteCode/vectors.cpp
+2-0clang/lib/AST/ByteCode/Descriptor.cpp
+6-02 files

LLVM/project ca8082fllvm/lib/Transforms/InstCombine InstCombineAndOrXor.cpp, llvm/test/Transforms/InstCombine and-xor-merge.ll

[InstCombine] Fold ((X + AddC) & Mask) ^ Mask to (~AddC - X) & Mask (#174278)

This patch optimizes specific pattern.

((X + AddC) & Mask) ^ Mask
-> (~AddC - X) & Mask

Proof: https://alive2.llvm.org/ce/z/XFHfnD
Fixed: https://github.com/llvm/llvm-project/issues/128475
DeltaFile
+142-0llvm/test/Transforms/InstCombine/and-xor-merge.ll
+24-0llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+166-02 files

LLVM/project ac63824clang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode invalid.cpp

[clang][bytecode] Check for invalid call expressions (#181327)

DeltaFile
+9-0clang/test/AST/ByteCode/invalid.cpp
+2-0clang/lib/AST/ByteCode/Compiler.cpp
+11-02 files

LLVM/project 6906c5cclang/lib/AST/ByteCode InterpBuiltin.cpp, clang/test/AST/ByteCode builtin-functions.cpp

[clang][bytecode] Fix __builtin_nan* for non-primitive arrays (#181326)

They might've been casted, so we need t check for it, not assert.
DeltaFile
+4-0clang/test/AST/ByteCode/builtin-functions.cpp
+2-1clang/lib/AST/ByteCode/InterpBuiltin.cpp
+6-12 files

LLVM/project a76e696clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded vabs.c vabdu.c, clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded vabs.c vabdu.c

Regenerate C tests

Created using spr 1.3.6-beta.1
DeltaFile
+956-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded/vabs.c
+956-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded/vabs.c
+603-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded/vabdu.c
+603-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded/vabdu.c
+585-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/non-overloaded/vabd.c
+585-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvabd/policy/overloaded/vabd.c
+4,288-035 files not shown
+9,397-2,96141 files

LLVM/project eb30b5cllvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 neon-compare-instructions.ll

[AArch64] Lower SETLE and SETLT vector CondCodes to FCMGT/FCMGE directly.

We previously checked that the compare was NoNan, but the "don't care"
condition codes can be set from known-values as well as nnan instructions.
Lower the vector condition codes directly so that they do not get scalarized
into many scalar instructions.
DeltaFile
+18-94llvm/test/CodeGen/AArch64/neon-compare-instructions.ll
+8-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+26-942 files

LLVM/project 8f22e43clang/lib/AST/ByteCode Interp.h, clang/test/AST/ByteCode complex.c

[clang][bytecode] Fix multi-word complex division (#181325)

Looks like I forgot about `isZero()` when writing this.
DeltaFile
+2-4clang/lib/AST/ByteCode/Interp.h
+2-0clang/test/AST/ByteCode/complex.c
+4-42 files

LLVM/project 25ea920clang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode complex.cpp

[clang][bytecode] Fix already initializing _Complex UO_Not (#181323)

We'd accidentally leave the subexpr pointer on the stack.
DeltaFile
+2-2clang/lib/AST/ByteCode/Compiler.cpp
+1-0clang/test/AST/ByteCode/complex.cpp
+3-22 files

LLVM/project e2cc034utils/bazel/llvm-project-overlay/lldb/source/Plugins BUILD.bazel

[bazel] Fix 22a3f7b.
DeltaFile
+5-5utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+5-51 files

LLVM/project 5629f4eutils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel] Port a1d7cda.
DeltaFile
+9-2utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+9-21 files