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

LLVM/project 420047cllvm/lib/Target/AArch64 AArch64SelectionDAGInfo.cpp AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sve-mask-partition.ll

[AArch64] Fix active.lane.mask(0, cttz.elts(x)) -> 'brkb' transform (#180177)

If the result type and mask don't match, the transform is not valid.
DeltaFile
+58-0llvm/test/CodeGen/AArch64/sve-mask-partition.ll
+4-0llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
+2-1llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+64-13 files

LLVM/project 25a56fbclang-tools-extra/clang-tidy/bugprone BadSignalToKillThreadCheck.cpp, clang-tools-extra/clangd/unittests DiagnosticsTests.cpp

[clang-tidy] Fix bugprone-bad-signal-to-kill-thread not working in clangd (#180711)

After preamble deserialization, `Token::getLiteralData()` returns
`nullptr` for macro tokens defined in headers. Fall back to
`SourceManager` to retrieve the token text from the source buffer.

Fixes https://github.com/clangd/clangd/issues/2473
DeltaFile
+19-0clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
+8-2clang-tools-extra/clang-tidy/bugprone/BadSignalToKillThreadCheck.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+31-23 files

LLVM/project b9f4c78clang-tools-extra/clangd CodeComplete.cpp, clang-tools-extra/clangd/unittests CodeCompleteTests.cpp

[clangd] Respect ArgumentLists setting for lambdas (#181009)

Fixes https://github.com/clangd/clangd/issues/1861
DeltaFile
+12-0clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
+7-5clang-tools-extra/clangd/CodeComplete.cpp
+19-52 files

LLVM/project 8d5a58ellvm/test/CodeGen/AArch64 neon-compare-instructions.ll

[AArch64] Even more fcmp+select tests. NFC

This time from known bits.
DeltaFile
+360-0llvm/test/CodeGen/AArch64/neon-compare-instructions.ll
+360-01 files

LLVM/project 29b363eclang/lib/AST/ByteCode EvalEmitter.cpp, clang/test/AST/ByteCode cxx23.cpp

[clang][bytecode] Don't check lvalue expressions for initialization (#181309)

We're not reading from them, so they don't need to be fully initialized.
DeltaFile
+10-0clang/test/AST/ByteCode/cxx23.cpp
+2-4clang/test/CodeGenCXX/cxx2a-consteval.cpp
+1-1clang/lib/AST/ByteCode/EvalEmitter.cpp
+13-53 files

LLVM/project 54c080dmlir/tools/mlir-tblgen DialectGen.cpp

[MLIR][ODS] Make dialect attribute helper member functions const (NFC) (#181111)

This commit marks member functions of dialect attribute helpers as
constant. This ensures that these helpers can be used as members of
rewrite patterns, whose `matchAndRewrite` functions are marked as const
as well.
DeltaFile
+6-6mlir/tools/mlir-tblgen/DialectGen.cpp
+6-61 files

LLVM/project da6851flldb/source/API SBFile.cpp

[lldb] Fix typo: transfer_owndership -> transfer_ownership (NFC) (#181314)

DeltaFile
+3-3lldb/source/API/SBFile.cpp
+3-31 files

LLVM/project 655b6fblldb/include/lldb/Breakpoint StoppointHitCounter.h, lldb/include/lldb/Core DebuggerEvents.h Declaration.h

[lldb] Fix LLDB header guards (NFC) (#181312)

Fix LLDB header guards using clang-tidy's llvm-header-guard check. A
bunch of headers have been moved or renamed and we often forget to
update the header guard.
DeltaFile
+3-4lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+3-3lldb/include/lldb/Breakpoint/StoppointHitCounter.h
+3-3lldb/include/lldb/Core/DebuggerEvents.h
+3-3lldb/include/lldb/Core/Declaration.h
+3-3lldb/include/lldb/Core/SourceLocationSpec.h
+3-3lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h
+18-1979 files not shown
+229-23085 files

LLVM/project 5ab9cbellvm/test/CodeGen/ARM fp-intrinsics-vector-v8.ll, llvm/test/CodeGen/Thumb2/mve-intrinsics strict-round.ll

[ARM] Precommit tests: strictfp rounding vector intrinsics (#180479)

DeltaFile
+154-0llvm/test/CodeGen/Thumb2/mve-intrinsics/strict-round.ll
+82-0llvm/test/CodeGen/ARM/fp-intrinsics-vector-v8.ll
+236-02 files

LLVM/project 4b88753lld/ELF RelocScan.h Relocations.cpp, lld/ELF/Arch X86.cpp X86_64.cpp

[ELF] Add target-specific relocation scanning for x86 (#178846)

Implement scanSection/scanSectionImpl for i386 and x86-64 to

* enable devirtualization of getRelExpr calls
* eliminate abstraction overhead for PLT-to-PCRel optimization, TLS
relocations
* optimize for R_X86_64_PC32 and R_X86_64_PLT32: they consist of 95%
  relocations in `lld/ELF/**/*.o` files.
* enable future optimization to remove `loc` from `getRelExpr` (only
  used by X86.cpp `R_386_GOT32[X]`)

at the cost of more boilerplate.

TLS relocation handling is inlined into scanSectionImpl. Also,

- Remove getTlsGdRelaxSkip
- Replace TLS-optimization-specific expressions:
- R_RELAX_TLS_GD_TO_LE, R_RELAX_TLS_LD_TO_LE, R_RELAX_TLS_IE_TO_LE →

    [16 lines not shown]
DeltaFile
+147-92lld/ELF/Arch/X86.cpp
+147-49lld/ELF/Arch/X86_64.cpp
+105-2lld/ELF/RelocScan.h
+11-1lld/ELF/Relocations.cpp
+410-1444 files

LLVM/project a809d64llvm/lib/Target/RISCV RISCVISelDAGToDAG.cpp RISCVISelLowering.cpp

[RISCV] Remove RISCVISD::WMACC*. Match during isel. NFC (#181197)

I think we may want to be able to fold ADDD nodes independent of the MUL
in some cases. For example turning NSRAI into NSRARI.

If we fold ADDD into WMACC we would need to be able to extract it again.
Keep the nodes separate avoids this.

Code change was assisted by AI.
DeltaFile
+98-62llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+0-76llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+0-13llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+1-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
+99-1514 files

LLVM/project a89e766llvm/lib/Transforms/Scalar IndVarSimplify.cpp, llvm/test/Transforms/IndVarSimplify scev-update-loop-opt.ll

[IndVarSimplify] Add safety check for getTruncateExpr in genLoopLimit (#181296)

getTruncateExpr may not always return a SCEVAddRecExpr when truncating
loop bounds. Add a check to verify the result type before casting, and
bail out of the transformation if the cast would be invalid.

This prevents potential crashes from invalid casts when dealing with
complex loop bounds.

Co-authored by Michael Rowan

Resolves
[https://github.com/llvm/llvm-project/issues/153090](https://github.com/llvm/llvm-project/issues/153090)
DeltaFile
+149-0llvm/test/Transforms/IndVarSimplify/scev-update-loop-opt.ll
+18-8llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+167-82 files

LLVM/project 48566b2mlir/include/mlir/Dialect/XeGPU/TransformOps XeGPUTransformOps.td, mlir/lib/Dialect/XeGPU/TransformOps XeGPUTransformOps.cpp

[MLIR][XeGPU][TransformOps] set_op_layout_attr supports setting anchor layout (#172542)

Changes `transform.xegpu.set_op_layout_attr` to support xegpu anchor
layouts. By default, if `result` and `operand` bool arguments are unset,
this transform op sets the op's anchor layout, if the op supports it
(otherwise emits a silenceable failure).

In contrast to the earlier implementation, setting the operand layout
now requires setting the new `operand` argument.
DeltaFile
+104-34mlir/test/Dialect/XeGPU/transform-ops.mlir
+42-6mlir/lib/Dialect/XeGPU/TransformOps/XeGPUTransformOps.cpp
+33-5mlir/test/python/dialects/transform_xegpu_ext.py
+15-9mlir/include/mlir/Dialect/XeGPU/TransformOps/XeGPUTransformOps.td
+20-1mlir/test/Dialect/XeGPU/transform-ops-invalid.mlir
+4-0mlir/python/mlir/dialects/transform/xegpu.py
+218-556 files

LLVM/project 3b7acb4clang/test/OpenMP task_codegen.cpp threadprivate_codegen.cpp, llvm/test/CodeGen/AArch64 clmul-fixed.ll

Merge branch 'main' into users/spavloff/arm.test
DeltaFile
+5,835-5,584llvm/test/tools/llvm-dwarfdump/X86/simplified-template-names.s
+5,528-5,528llvm/test/CodeGen/AMDGPU/whole-wave-functions.ll
+4,314-4,314llvm/test/CodeGen/AMDGPU/accvgpr-spill-scc-clobber.mir
+3,458-2,041clang/test/OpenMP/task_codegen.cpp
+2,140-2,140clang/test/OpenMP/threadprivate_codegen.cpp
+4,119-13llvm/test/CodeGen/AArch64/clmul-fixed.ll
+25,394-19,6203,758 files not shown
+209,468-97,4293,764 files

LLVM/project da9c513clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/include/clang/CIR/Interfaces ASTAttrInterfaces.td

[CIR][LoweringPrepare] Emit guard variables for static local initialization (#179828)

This implements the lowering of static local variables with the Itanium C++ ABI
guard variable pattern in LoweringPrepare. This is initial support, errorNYI covering all that hasn't been added just yet.

When a GlobalOp has the static_local attribute and a ctor region, this pass:
1. Creates a guard variable global (mangled name from AST)
2. Inserts the guard check pattern at each GetGlobalOp use site:
   - Load guard byte with acquire ordering
   - If zero, call __cxa_guard_acquire
   - If acquire returns non-zero, inline the ctor region code
   - Call __cxa_guard_release
3. Clears the static_local attribute and ctor region from the GlobalOp

Once the new design doc lands I'll add more information over there.
DeltaFile
+405-2clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+35-2clang/test/CIR/CodeGen/static-local.cpp
+19-4clang/lib/CIR/CodeGen/CIRGenDeclCXX.cpp
+20-0clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+0-12clang/include/clang/CIR/Interfaces/ASTAttrInterfaces.td
+7-3clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+486-236 files not shown
+501-3712 files

LLVM/project e999b50llvm/lib/Transforms/Utils MatrixUtils.cpp

wording

Created using spr 1.3.7
DeltaFile
+2-2llvm/lib/Transforms/Utils/MatrixUtils.cpp
+2-21 files

LLVM/project 59cf57ellvm/lib/Transforms/Utils MatrixUtils.cpp

feedback

Created using spr 1.3.7
DeltaFile
+2-2llvm/lib/Transforms/Utils/MatrixUtils.cpp
+2-21 files

LLVM/project cbb978fllvm/test/CodeGen/RISCV/rvv vabs.ll vabdu.ll

Add masked .ll tests

Created using spr 1.3.6-beta.1
DeltaFile
+469-288llvm/test/CodeGen/RISCV/rvv/vabs.ll
+295-171llvm/test/CodeGen/RISCV/rvv/vabdu.ll
+295-171llvm/test/CodeGen/RISCV/rvv/vabd.ll
+249-145llvm/test/CodeGen/RISCV/rvv/vwabdau.ll
+249-145llvm/test/CodeGen/RISCV/rvv/vwabda.ll
+1,557-9205 files