LLVM/project f3c1645llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel buffer-load-byte-short.ll llvm.amdgcn.raw.buffer.load.ll

[Reland][AMDGPU][GlobalISel] Add register bank legalization for buffer_load byte and short (#172065)

This patch adds register bank legalization support for buffer load byte
and short operations in the AMDGPU GlobalISel pipeline.

This is a re-land of #167798. I have fixed the failing test
/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll
DeltaFile
+253-0llvm/test/CodeGen/AMDGPU/GlobalISel/buffer-load-byte-short.ll
+6-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+3-3llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.load.ll
+3-3llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.struct.buffer.load.ll
+1-1llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.ptr.buffer.load.ll
+1-1llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.struct.ptr.buffer.load.ll
+267-86 files

LLVM/project 226b652llvm/lib/Target/AMDGPU AMDGPUCodeGenPrepare.cpp, llvm/test/CodeGen/AMDGPU rsq.f32-safe.ll amdgpu-codegenprepare-fdiv.ll

AMDGPU: Stop requiring afn for f32 rsq formation

We were checking for afn or !fpmath attached to the sqrt. We
are not trying to replace a correctly rounded rsqrt; we're replacing
the two correctly rounded operations with the contracted operation.
It's net a better precision, so contract on both instructions should
be sufficient. Both the contracted and uncontracted sequences pass
the OpenCL conformance test, with a lower maximum error contracted.
DeltaFile
+504-1,529llvm/test/CodeGen/AMDGPU/rsq.f32-safe.ll
+52-45llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fdiv.ll
+6-25llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+562-1,5993 files

LLVM/project f195d52clang/lib/CIR/CodeGen CIRGenModule.cpp, clang/test/CIR/CodeGen wide-string.cpp

[CIR] Support wide string literals in CIR codegen (#171541)

This PR migrates support for wide string literals from the incubator to
upstream.

## Changes

- Implement wide string literal support in
`getConstantArrayFromStringLiteral`
- Handle wchar_t, char16_t, and char32_t string literals
- Collect code units and create constant arrays with IntAttr elements
- Use ZeroAttr for null-filled strings

## Testing

- Copied `wide-string.cpp` test file from incubator
- Expanded test to include wchar_t test cases (incubator only had
char16_t and char32_t)
- All tests pass

    [3 lines not shown]
DeltaFile
+63-0clang/test/CIR/CodeGen/wide-string.cpp
+37-3clang/lib/CIR/CodeGen/CIRGenModule.cpp
+100-32 files

LLVM/project 0d53746clang/lib/Sema SemaExpr.cpp SemaOverload.cpp, clang/test/CodeGenHLSL/BasicFeatures MatrixSplat.hlsl

[HLSL][Matrix] Add support for ICK_HLSL_Matrix_Splat to add splat cast of scalars (#170885)

fixes #168960

Adds `ICK_HLSL_Matrix_Splat` and hooks it up to
`PerformImplicitConversion` and `IsMatrixConversion`. Map these to
`CK_HLSLAggregateSplatCast`.
DeltaFile
+57-0clang/test/CodeGenHLSL/BasicFeatures/MatrixSplat.hlsl
+20-0clang/lib/Sema/SemaExpr.cpp
+12-0clang/lib/Sema/SemaOverload.cpp
+9-3clang/test/SemaHLSL/MatrixElementOverloadResolution.hlsl
+11-0clang/test/SemaHLSL/Types/BuiltinMatrix/MatrixSplatErrors.hlsl
+10-0clang/lib/Sema/SemaExprCXX.cpp
+119-32 files not shown
+126-38 files

LLVM/project 1307b77clang/lib/StaticAnalyzer/Checkers/WebKit PtrTypesSemantics.cpp PtrTypesSemantics.h

Delete unused code in WebKit checkers (#171768)

DeltaFile
+0-50clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
+0-8clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
+0-582 files

LLVM/project 64e568fclang-tools-extra/clang-tidy/abseil UncheckedStatusOrAccessCheck.cpp, clang-tools-extra/docs/clang-tidy/checks/abseil unchecked-statusor-access.rst

[clang-tidy] add abseil-unchecked-statusor-access (#171188)

The mock headers are copied from
clang/unittests/Analysis/FlowSensitive/MockHeaders.cpp.

Relevant RFC:
https://discourse.llvm.org/t/rfc-abseil-unchecked-statusor-use-check/87998
DeltaFile
+427-0clang-tools-extra/test/clang-tidy/checkers/abseil/Inputs/type_traits
+384-0clang-tools-extra/docs/clang-tidy/checks/abseil/unchecked-statusor-access.rst
+346-0clang-tools-extra/test/clang-tidy/checkers/abseil/Inputs/absl/status/statusor.h
+138-0clang-tools-extra/test/clang-tidy/checkers/abseil/unchecked-statusor-access.cpp
+69-0clang-tools-extra/test/clang-tidy/checkers/abseil/Inputs/absl/status/status.h
+68-0clang-tools-extra/clang-tidy/abseil/UncheckedStatusOrAccessCheck.cpp
+1,432-07 files not shown
+1,532-013 files

LLVM/project 72e40b6utils/bazel/llvm-project-overlay/mlir BUILD.bazel

Fix bazel build for c9ad896dd73382e7a453b6cd34413767a1341034
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project da77cdeutils/bazel/llvm-project-overlay/mlir BUILD.bazel

Fix bazel build for 5f6a5e02cd51708f460e6c4d2b18a2745b220b58
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project a6c211dutils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel] Port d107b3c82a7abd1a6a0e2900e8cd01e2a7c46748 (#172077)

DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 525bef3utils/bazel/llvm-project-overlay/mlir BUILD.bazel

Fix bazel build for d107b3c82a7abd1a6a0e2900e8cd01e2a7c46748
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 9bc38dfllvm/include/llvm/Transforms/Utils CodeMoverUtils.h, llvm/lib/Transforms/Scalar LoopFuse.cpp

[LoopFusion] Simplifying the legality checks (#171889)

Considering that the current loop fusion only supports adjacent loops,
we are able to simplify the checks in this pass. By removing
`isControlFlowEquivalent` check, this patch fixes multiple issues
including #166560, #166535, #165031, #80301 and #168263.

Now only the sequential/adjacent candidates are collected in the same
list. This patch is the implementation of approach 2 discussed in post
#171207.
DeltaFile
+226-317llvm/lib/Transforms/Scalar/LoopFuse.cpp
+0-372llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
+2-55llvm/test/Transforms/LoopFusion/diagnostics_missed.ll
+0-46llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
+16-21llvm/test/Transforms/LoopFusion/cannot_fuse.ll
+0-16llvm/include/llvm/Transforms/Utils/CodeMoverUtils.h
+244-8276 files

LLVM/project 0603d4allvm/lib/CodeGen/GlobalISel GISelValueTracking.cpp, llvm/unittests/CodeGen/GlobalISel KnownFPClassTest.cpp

Fix misprint in computeKnownFPClass in GISelValueTracking.cpp (#171566)

Fix wrong value(from Instruction enum) in conditional and add test
check.
Related with https://github.com/llvm/llvm-project/issues/169959
DeltaFile
+99-0llvm/unittests/CodeGen/GlobalISel/KnownFPClassTest.cpp
+3-2llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+102-22 files

LLVM/project 7965957flang/include/flang/Lower/OpenMP Clauses.h, flang/lib/Lower/OpenMP Clauses.cpp

[OpenMP] Define remaining OpenMP 6.0 clauses, add flang skeleton

Add definitions of the remaining OpenMP 6.0 clauses to the OMP.td
file. Implement the bare-bones skeleton in flang to support the new
definitions.

Adding a clause to OMP.td automatically generates some flang code
which requires manual completion to even compile. This PR adds the
absolute minimum for all 6.0 clauses that were still missing. This
minimum does not implement any OpenMP functionality, it just allows
flang to compile and run. As a benefit, any future clause-related
clang work will not require any changes to flang.
DeltaFile
+71-19llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+36-18llvm/include/llvm/Frontend/OpenMP/OMP.td
+21-14flang/include/flang/Lower/OpenMP/Clauses.h
+9-1flang/lib/Lower/OpenMP/Clauses.cpp
+8-0flang/lib/Semantics/check-omp-structure.cpp
+145-525 files

LLVM/project d901485llvm/lib/Target/Mips Mips32r6InstrInfo.td Mips64r6InstrInfo.td, llvm/test/CodeGen/Mips compact-branch-combine.ll compact-branch-combine-never.ll

[Mips] Add compact branch patterns for MipsR6 (#171131)

Added patterns for combining set and branch into one compact branch

The patterns are disabled if -mips-compact-branches=never
DeltaFile
+463-0llvm/test/CodeGen/Mips/compact-branch-combine.ll
+75-0llvm/test/CodeGen/Mips/compact-branch-combine-never.ll
+38-0llvm/lib/Target/Mips/Mips32r6InstrInfo.td
+38-0llvm/lib/Target/Mips/Mips64r6InstrInfo.td
+1-19llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
+17-0llvm/lib/Target/Mips/MipsSubtarget.h
+632-195 files not shown
+656-2611 files

LLVM/project 3ef687bclang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/clang-doc/assets namespace-template.mustache

[clang-doc] Add namespaces to namespace template

Emit namespaces in HTML for namespaces pages.
DeltaFile
+28-0clang-tools-extra/clang-doc/assets/namespace-template.mustache
+20-0clang-tools-extra/test/clang-doc/mustache-separate-namespace.cpp
+0-11clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
+5-2clang-tools-extra/clang-doc/JSONGenerator.cpp
+1-1clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
+0-2clang-tools-extra/test/clang-doc/json/function-requires.cpp
+54-163 files not shown
+55-199 files

LLVM/project c9ad896clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/clang-doc/assets namespace-template.mustache function-template.mustache

[clang-doc] Add functions to namespace template (#171938)

Emit namespace-level (global) functions in HTML.
DeltaFile
+45-25clang-tools-extra/test/clang-doc/namespace.cpp
+43-0clang-tools-extra/test/clang-doc/templates.cpp
+26-0clang-tools-extra/clang-doc/assets/namespace-template.mustache
+5-1clang-tools-extra/clang-doc/assets/function-template.mustache
+3-1clang-tools-extra/clang-doc/JSONGenerator.cpp
+1-0clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
+123-271 files not shown
+124-277 files

LLVM/project 5f6a5e0clang/lib/StaticAnalyzer/Checkers/WebKit ForwardDeclChecker.cpp, clang/test/Analysis/Checkers/WebKit forward-decl-checker.mm

[alpha.webkit.ForwardDeclChecker] Add a missing nullptr check (#171740)

DeltaFile
+5-4clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
+4-0clang/test/Analysis/Checkers/WebKit/forward-decl-checker.mm
+9-42 files

LLVM/project d107b3cmlir/include/mlir/Dialect/AMDGPU/IR AMDGPU.td, mlir/lib/Dialect/AMDGPU/IR AMDGPUDialect.cpp

[MLIR][AMDGPU] Implement reifyDimOfResult for FatRawBufferCastOp (#171839)

Since `FatRawBufferCastOp` preserves the shape of its source operand,
the result dimensions can be reified by querying the source's
dimensions.

---------

Signed-off-by: Yu-Zhewen <zhewenyu at amd.com>
DeltaFile
+33-0mlir/test/Dialect/AMDGPU/resolve-shaped-type-result-dims.mlir
+13-0mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
+2-0mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td
+48-03 files

LLVM/project a94920cllvm/lib/Target/NVPTX NVPTXISelDAGToDAG.cpp NVPTXISelLowering.cpp, llvm/test/CodeGen/NVPTX jump-table.ll switch.ll

[NVPTX] Fixup and refactor brx.idx support (#171933)

Guard "brx.idx" generation to appropriate PTX ISA and SM version.

In addition, do some minor refactoring moving the expansion into ISel as
doing this during operation legalization is more complex and offers no
benefits.

fixes https://github.com/llvm/llvm-project/issues/171709
DeltaFile
+193-85llvm/test/CodeGen/NVPTX/jump-table.ll
+38-0llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
+1-33llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+3-22llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
+1-1llvm/test/CodeGen/NVPTX/switch.ll
+0-2llvm/lib/Target/NVPTX/NVPTXISelLowering.h
+236-1432 files not shown
+238-1438 files

LLVM/project 8d5ade8mlir/lib/ExecutionEngine CMakeLists.txt, mlir/test lit.cfg.py

[mlir] enable APFloatWrappers on MacOS (#172070)

DeltaFile
+5-5mlir/lib/ExecutionEngine/CMakeLists.txt
+2-2mlir/test/lit.cfg.py
+1-1mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+1-1mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
+9-94 files

LLVM/project a745e5dclang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/clang-doc/assets namespace-template.mustache function-template.mustache

[clang-doc] Serialize namespace-level functions
DeltaFile
+45-25clang-tools-extra/test/clang-doc/namespace.cpp
+43-0clang-tools-extra/test/clang-doc/templates.cpp
+26-0clang-tools-extra/clang-doc/assets/namespace-template.mustache
+5-1clang-tools-extra/clang-doc/assets/function-template.mustache
+3-1clang-tools-extra/clang-doc/JSONGenerator.cpp
+1-0clang-tools-extra/test/clang-doc/json/namespace.cpp
+123-271 files not shown
+124-277 files

LLVM/project 8f26458clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/test/clang-doc templates.cpp

[clang-doc] Add class template to HTML (#171937)

Emit class template declaration info so that it appears above a record's name in the Mustache template.
DeltaFile
+37-7clang-tools-extra/test/clang-doc/templates.cpp
+9-2clang-tools-extra/clang-doc/JSONGenerator.cpp
+8-2clang-tools-extra/test/clang-doc/json/function-requires.cpp
+8-2clang-tools-extra/test/clang-doc/json/class-specialization.cpp
+4-1clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
+4-1clang-tools-extra/test/clang-doc/json/class-requires.cpp
+70-155 files not shown
+89-1911 files

LLVM/project e0e5b6ellvm/lib/CodeGen/GlobalISel InlineAsmLowering.cpp, llvm/test/CodeGen/AArch64/GlobalISel irtranslator-inline-asm.ll

[GISel][Inlineasm] Support inlineasm i/s constraint for symbols (#170094)

DeltaFile
+19-0llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-inline-asm.ll
+11-0llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+30-02 files

LLVM/project dcbca43mlir/include/mlir/Dialect/PDL/IR PDLOps.td PDLOps.h, mlir/lib/Dialect/PDL/IR PDL.cpp CMakeLists.txt

[mlir][PDL] Add CallableOpInterface to pdl.pattern and inlining support to pdl

This commit enables inlining of calls within PDL patterns by:

1. Adding CallableOpInterface to PatternOp, and implementing the required
   interface methods (getCallableRegion, getArgumentTypes, getResultTypes)
   and the ArgAndResultAttrsOpInterface stubs to make pdl.pattern a
   valid callable.

2. Adding the dialect inliner interface that marks all operations as legal
  to inline.

This is particularly useful for nonmaterializable patterns that may
contain func.call operations to external functions defining pattern
matching or rewrite logic. After inlining, these patterns can be
transformed into standard materializable PDL patterns.

NOTE: The pattern op needs to be marked callable as the inliner doesn't
allow inlining if there's no callable ancestor.

    [33 lines not shown]
DeltaFile
+64-1mlir/include/mlir/Dialect/PDL/IR/PDLOps.td
+30-0mlir/test/Dialect/PDL/inlining.mlir
+20-0mlir/lib/Dialect/PDL/IR/PDL.cpp
+1-0mlir/include/mlir/Dialect/PDL/IR/PDLOps.h
+1-0mlir/lib/Dialect/PDL/IR/CMakeLists.txt
+116-15 files

LLVM/project 76c3eedllvm/lib/Target/AArch64/GISel AArch64LegalizerInfo.cpp, llvm/test/CodeGen/AArch64 vector-lrint.ll vector-llrint.ll

[AArch64][GlobalISel] Fix vector lrint/llrint fallbacks (#170814)

Add .lower() to vector lrint/llrint to enable lowering instead of
falling back to SelectionDAG.
DeltaFile
+2,502-1,473llvm/test/CodeGen/AArch64/vector-lrint.ll
+1,301-712llvm/test/CodeGen/AArch64/vector-llrint.ll
+8-8llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
+4-2llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+3,815-2,1954 files

LLVM/project fc60835llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU bf16.ll

Merge branch 'main' into users/evelez7/clang-doc-class-templates-html
DeltaFile
+769-788llvm/test/CodeGen/X86/any_extend_vector_inreg_of_broadcast_from_memory.ll
+759-775llvm/test/CodeGen/X86/zero_extend_vector_inreg_of_broadcast_from_memory.ll
+820-0llvm/test/CodeGen/AMDGPU/bf16.ll
+677-36mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+347-304llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+637-0mlir/test/Dialect/LLVMIR/nvvm-mma-sparse-blockscale.mlir
+4,009-1,903569 files not shown
+21,412-7,175575 files

LLVM/project 5397221lldb/examples/python/templates scripted_process.py, lldb/test/API/functionalities/scripted_frame_provider TestScriptedFrameProvider.py

[lldb] Add arm32/thumb register layout to Scripted{Frame,Thread} (#172005)

DeltaFile
+84-483lldb/examples/python/templates/scripted_process.py
+0-1lldb/test/API/functionalities/scripted_frame_provider/TestScriptedFrameProvider.py
+0-1lldb/test/API/functionalities/scripted_frame_provider/circular_dependency/TestFrameProviderCircularDependency.py
+84-4853 files

LLVM/project ed42c81clang-tools-extra/test/clang-doc templates.cpp

[clang-doc] Add JSON output to existing template tests (#171936)

clang-doc has some useful, preexisting tests for templates, so we'll
reuse them to cover more cases.
DeltaFile
+88-0clang-tools-extra/test/clang-doc/templates.cpp
+88-01 files

LLVM/project 01540dcmlir/lib/ExecutionEngine CMakeLists.txt, mlir/test lit.cfg.py

[mlir] enable APFloatWrappers on MacOS
DeltaFile
+5-5mlir/lib/ExecutionEngine/CMakeLists.txt
+2-2mlir/test/lit.cfg.py
+1-1mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+1-1mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
+9-94 files

LLVM/project 112a612llvm/lib/CodeGen MachineInstr.cpp MachineFunction.cpp, llvm/lib/DebugInfo/LogicalView/Readers LVDWARFReader.cpp

Fixes non-functional changes found static analyzer (#171197)

As per @arsenm 's instructions, I've separated the non-functional
changes from https://github.com/llvm/llvm-project/pull/169958.
Afterwards I'll tackle the functional ones one by one. I hope I did
everything right this time.

Full descriptions in the article:
https://pvs-studio.com/en/blog/posts/cpp/1318/
3. Array overrun is possible.
The PVS-Studio warning: V557 Array overrun is possible. The value of
'regIdx' index could reach 31. VEAsmParser.cpp 696
10. Excessive check.
The PVS-Studio warning: V547 Expression 'IsLeaf' is always false.
PPCInstrInfo.cpp 419
11. Doubling the same check.
The PVS-Studio warning: V581 The conditional expressions of the 'if'
statements situated alongside each other are identical. Check lines:
5820, 5823. PPCInstrInfo.cpp 5823

    [11 lines not shown]
DeltaFile
+8-10llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+3-4llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
+0-5llvm/lib/CodeGen/MachineInstr.cpp
+1-4llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+1-2llvm/lib/CodeGen/MachineFunction.cpp
+1-1llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
+14-266 files