LLVM/project 264119fllvm/test/CodeGen/Generic/GlobalISel irtranslator-byte-type.ll

Revert "[IRTranslator] Precommit tests for bitcasts of the byte type (#203638)"

This reverts commit 7e5bc4c7bd23e390cdb0b08f807968ea256b0df2
as the MachineVerifier identifies 'bad machine code'.
DeltaFile
+0-497llvm/test/CodeGen/Generic/GlobalISel/irtranslator-byte-type.ll
+0-4971 files

LLVM/project 5a5d0fbllvm/lib/Transforms/Scalar SimpleLoopUnswitch.cpp, llvm/test/Transforms/PhaseOrdering unswitch-nontrivial-cold-func.ll

[SimpleLoopUnswitch] Generalize the notion of trivial unswitching (#193989)

For a loop like this 

```
     for (int j = 0; j < M; j++) {
       if (N <= 0) continue;          // invariant guard branches to latch
       for (int i = 0; i < N; i++)
         A[i] = B[i] + 1;
     }
```
Since none of the successors of the guard branch of the inner loop are
outside the loop `j`, unswitching treats this as a non-trivial branch.
In reality, this is a perfect loop nest. If the condition of the guard
of `i` loop is false, there is nothing to do and so if we unswitch this
branch, the loop does not need to be versioned. This matches the
requirements of a trivial unswitch. This patch extends trivial loop
unswitching to catch cases like this.


    [3 lines not shown]
DeltaFile
+1,031-0llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-loop-guard.ll
+114-0llvm/test/Transforms/PhaseOrdering/unswitch-nontrivial-cold-func.ll
+31-31llvm/test/Transforms/PhaseOrdering/X86/hoist-load-of-baseptr.ll
+29-29llvm/test/Transforms/PhaseOrdering/AArch64/matrix-extract-insert.ll
+48-3llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+19-30llvm/test/Transforms/SimpleLoopUnswitch/PGO-nontrivial-unswitch2.ll
+1,272-935 files not shown
+1,316-13411 files

LLVM/project 96127e6offload/plugins-nextgen/amdgpu/src rtl.cpp, offload/plugins-nextgen/common/include PluginInterface.h

[Offload] Fix pessimistic max block count sizing on AMDGPU (#204242)

Summary:
For whatever reason, HSA copied the questionable choices that OpenCL
made and represents its launch parameters in a threads * blocks grid.
The problem is that you then combine this with an `int32_t` interface,
so you have 31 bits to represent your launch. We were then
pessimistically stating that your launch always had 1024 threads, which
left us with 2^21. This is only about two million which people do all
the time, and this caused us to perform weird clamping in OpenMP. The
effect was that tests like ompx_saxpy_mixed.c was hitting that clamp and
returning wrong results.

Also fix the sanitizer tests failing because of HSA core dumps.
DeltaFile
+9-7offload/plugins-nextgen/common/src/PluginInterface.cpp
+12-0offload/plugins-nextgen/amdgpu/src/rtl.cpp
+5-1offload/plugins-nextgen/common/include/PluginInterface.h
+26-83 files

LLVM/project 22d7698mlir/lib/Dialect/GPU/Pipelines GPUToXeVMPipeline.cpp

[MLIR][GPUToXeVMPipeline] Expand MX scaling ops before XeVM conversion (#203632)

arith.scaling_extf/scaling_truncf were never lowered by the
gpu-lower-to-xevm pipeline, so micro-scaling (MX) GEMM kernels kept
these ops (and their narrow-float operands) live all the way to LLVM
translation.

Run arith-expand before the XeVM/LLVM conversions to break
scaling_extf/scaling_truncf into extf/truncf + mulf and to expand
f8E8M0FNU casts into integer bit manipulation. f4E2M1FN expansion is
intentionally left disabled: its casts are lowered by the XeVM
conversions (xevm.extf), whereas f8E8M0FNU is not handled there and must
be expanded here. The generic f4E2M1FN expansion would otherwise emit i4
vector arithmetic that the XeVM backend cannot legalize.
DeltaFile
+13-0mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp
+13-01 files

LLVM/project 5fcb285mlir/lib/Conversion/XeGPUToXeVM XeGPUToXeVM.cpp, mlir/test/Conversion/XeGPUToXeVM loadstore_matrix.mlir

[MLIR][XeGPU] Fix load_matrix lowering for non-LLVM element types (#203629)

LoadStoreMatrixToXeVMPattern built the llvm.load result from the raw op
result element type. For element types without a direct LLVM
representation (e.g. f8E8M0FNU) this produced an illegal op: 'llvm.load'
op result #0 must be LLVM type with size, but got 'f8E8M0FNU'.

Derive the load result type from the type converter instead. This maps
such element types to an integer storage type of the same bit width,
collapses single-element vectors to a scalar, and flattens multi-element
vectors. The store path already used the converted operand and is
unchanged; the XeVM type converter's materialization casts bridge the
loaded value back to the original vector type for downstream consumers.

Add load_matrix regression tests for f8E8M0FNU (scalar and vector).
DeltaFile
+25-1mlir/test/Conversion/XeGPUToXeVM/loadstore_matrix.mlir
+8-10mlir/lib/Conversion/XeGPUToXeVM/XeGPUToXeVM.cpp
+33-112 files

LLVM/project d76dd87lldb/cmake/modules AddLLDB.cmake, lldb/source/Plugins/ScriptInterpreter/Lua CMakeLists.txt

[lldb] Fix LLDB_BUILD_FRAMEWORK with the dynamic script interpreters (#204265)

When using LLDB_ENABLE_DYNAMIC_SCRIPTINTERPRETERS (the default on Darwin
as of #204015), the PluginManager loads at runtime by scanning the
directory that holds liblldb. A framework build moves liblldb into
LLDB.framework, but the plugins were only emitted into lib/ and never
copied into the bundle, so they were never found.

Add lldb_add_scriptinterpreter_plugin_to_framework(), called from the
Python and Lua plugin CMakeLists, which copies the plugin next to the
framework binary and appends an rpath so it can resolve liblldb from
inside the bundle. The copy uses the plugin's unversioned name because
PluginManager derives the initializer symbol from it (a versioned copy
would load but never register). Non-framework builds are unaffected.
DeltaFile
+25-0lldb/cmake/modules/AddLLDB.cmake
+2-0lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt
+2-0lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+29-03 files

LLVM/project 0176227llvm/include/llvm/Transforms/Utils Local.h, llvm/lib/Transforms/Utils SimplifyCFG.cpp

[SimplifyCFG] Use context instruction in foldBranchToCommonDest() (#203516)

When determining whether instructions can be speculate, pass the
terminator of the predecessor as the context instruction.

Only do this for the single predecessor case, otherwise we'd have to
perform one query per predecessor. The multi-predecessor case is
excluded by the default cost model anyway.
DeltaFile
+246-0llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
+7-2llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+1-0llvm/include/llvm/Transforms/Utils/Local.h
+254-23 files

LLVM/project d398331lldb/unittests CMakeLists.txt

[lldb][unittests] Add LLDB_UNITTEST_STRIP_DEBUG_INFO to cut unittest link time (#203274)

Add an opt-in cache option (default OFF). When ON, every target declared
via `add_lldb_unittest` links without per-target debug info and
dead-strips:
- **MSVC**: `/DEBUG:NONE + /INCREMENTAL:NO + /OPT:REF + /OPT:ICF`
- **clang/gcc**: `-g0 + LINKER:--strip-debug` (or `LINKER:-S` on macOS).

This drastically speeds up linking the unittests executable when
building with debug info on Windows.
DeltaFile
+16-0lldb/unittests/CMakeLists.txt
+16-01 files

LLVM/project 616f771llvm/lib/Target/DirectX DXContainerPDB.cpp

Use c_str for formatv
DeltaFile
+2-2llvm/lib/Target/DirectX/DXContainerPDB.cpp
+2-21 files

LLVM/project a6ae624clang/include/clang/Options Options.td, clang/lib/Driver/ToolChains Clang.cpp

[Driver][DirectX] Add /Qembed_debug and /Fd flags
DeltaFile
+30-40llvm/lib/Target/DirectX/DXContainerGlobals.cpp
+38-0llvm/test/CodeGen/DirectX/ContainerData/ContainerFlags.ll
+18-9clang/include/clang/Options/Options.td
+22-0llvm/test/CodeGen/DirectX/ContainerData/DebugName.test
+19-0clang/lib/Driver/ToolChains/Clang.cpp
+15-0llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp
+142-4913 files not shown
+201-6419 files

LLVM/project ef3499ellvm/lib/Target/AMDGPU GCNRegPressure.cpp GCNRegPressure.h

Changed method name from setPhysRegTracking to updatePhysRegTracking.
DeltaFile
+2-2llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+2-2llvm/lib/Target/AMDGPU/GCNRegPressure.h
+1-1llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+5-53 files

LLVM/project 16f0408llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU BUILD.gn

[gn build] Port 2964323a936c (#204374)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
+1-01 files

LLVM/project 0926a1bllvm/utils/gn/secondary/llvm/include/llvm/IR BUILD.gn

[gn] port dcda5e1719a5e (#204373)
DeltaFile
+5-0llvm/utils/gn/secondary/llvm/include/llvm/IR/BUILD.gn
+5-01 files

LLVM/project b07436futils/bazel/llvm-project-overlay/libc BUILD.bazel

[bazel][libc] Fix f63d8d67a3ff11d06607f2f0cfedfd88d877e9de (#204372)

Add target for prlimit + add to deps
DeltaFile
+20-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+20-01 files

LLVM/project a9c1b68llvm/test/CodeGen/AMDGPU memory-legalizer-global-singlethread.ll memory-legalizer-flat-agent.ll

AMDGPU: Replace tgsplit subtarget feature with attribute

This is a per-entrypoint property and has a corresponding
assembler directive, so it should not be baked into the
subtarget. I couldn't find much documentation on what this
actually does, so the description isn't great.

Fixes #204149

Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-global-singlethread.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-agent.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-cluster.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-singlethread.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-system.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-global-wavefront.ll
+576-56443 files not shown
+2,545-2,45049 files

LLVM/project 14877f9clang/lib/AST AttrImpl.cpp Type.cpp, clang/utils/TableGen ClangAttrEmitter.cpp

[clang][AST] Attributed Type Deduplication Logic Cleanup (#204263)

https://github.com/llvm/llvm-project/pull/200961 implemented
`AttributedType` deduplication using the attributes' arguments. This PR
addresses the post-commit feedback.

The reason to have `llvm_unreachable("profile not implemented for this
type");` in the body of `profileAttrArg` for non-supported attribute
types is that none of the attributes that currently instantiate this
method are type attributes. The methods that are instantiated and not
supported are all for decl attributes. Leaving the body out will lead to
compilation failures, but the method's body should never be executed. If
an unsupported attribute type happens to execute this code path, the
failure should be loud and clear.
DeltaFile
+3-1clang/lib/AST/AttrImpl.cpp
+2-2clang/utils/TableGen/ClangAttrEmitter.cpp
+0-1clang/lib/AST/Type.cpp
+5-43 files

LLVM/project 1c78804llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.cpp AMDGPUBaseInfo.h

AMDGPU: Refactor AMDGPUTargetID to not store MCSubtargetInfo

Store the triple string and GPUKind instead. The dependence
on checking AMDHSA seems like an anti-feature, but maintain the
behavior of not printing the modifiers for other OSes. Start
parsing the target ID instead of performing a direct string
comparison. Also improve test coverage for the treatment of the
environment component of the triple. The main behavioral change
is this will now produce normalized triples in the output and
diagnostics. Practially, this means all of the places that
currently emit "--" will be expanded into "-unknown-".

Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+102-102llvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll
+79-36llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+34-10llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+22-22llvm/test/CodeGen/AMDGPU/hsa-note-no-func.ll
+27-1llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+17-0llvm/test/MC/AMDGPU/amdgcn-target-directive-triple-env.s
+281-17136 files not shown
+369-24742 files

LLVM/project 3b26820cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng dbgeng.py, cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb LLDB.py

[Dexter] Switch to using script-mode by default

This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests have
their flags switched accordingly.
DeltaFile
+2-6cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
+3-4cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
+3-3cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
+2-2cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
+2-2cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/dbgeng.py
+2-2cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/evaluation/eval_sublist_aggregates.cpp
+14-19168 files not shown
+188-193174 files

LLVM/project 38ce2c0cross-project-tests/debuginfo-tests/dexter-tests optnone-vectors-and-functions.cpp optnone-simple-functions.cpp, cross-project-tests/debuginfo-tests/dexter-tests/memvars inlining-dse.c

[Dexter] Update lldb-based dexter-tests to use script-mode

This patch replaces uses of heuristic-mode Dexter in the dexter-tests suite
with uses of the script-mode, for tests that use DAP (via lldb-dap). The
updates are largely straightforward but occasionally non-trivial, and in
some cases some slight modifications have been made to keep the "spirit" of
the test intact.
DeltaFile
+93-73cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
+98-51cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+68-54cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp
+57-33cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp
+30-19cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
+19-22cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining-dse.c
+365-25221 files not shown
+669-39227 files

LLVM/project 51f54bbclang/include/clang/Options Options.td, clang/lib/Driver/ToolChains Clang.cpp

[Driver][DirectX] Add `-Zss` and `-Zsb` flags (#203960)

Add flags that control whether the shader hash is computed with or
without including debug info (from ILDB or DXIL part).
DeltaFile
+24-6llvm/test/CodeGen/DirectX/ContainerData/DebugShaderHash.ll
+17-4llvm/lib/Target/DirectX/DXContainerGlobals.cpp
+12-3clang/lib/Driver/ToolChains/Clang.cpp
+7-0clang/test/Driver/dxc_debug.hlsl
+6-0llvm/test/CodeGen/DirectX/ContainerData/ShaderHash.ll
+4-0clang/include/clang/Options/Options.td
+70-131 files not shown
+72-137 files

LLVM/project 980e948llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AArch64 clmul-scalable.ll clmul-fixed.ll

[AArch64] Update Cost model for CLMUL (#202965)

CLMUL now has custom backend lowering and the efficiency of its lowering
is heavily dependant on available flags. This patch aligns the cost
model from the generic costs to the realistic costs.
DeltaFile
+72-0llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+57-0llvm/test/Analysis/CostModel/AArch64/clmul-scalable.ll
+37-0llvm/test/Analysis/CostModel/AArch64/clmul-fixed.ll
+23-12llvm/test/Analysis/CostModel/AArch64/clmul.ll
+2-2llvm/test/Transforms/LoopVectorize/AArch64/clmul.ll
+191-145 files

LLVM/project 92fa580cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb LLDB.py, cross-project-tests/debuginfo-tests/dexter/dex/evaluation Metrics.py

format
DeltaFile
+6-2cross-project-tests/debuginfo-tests/dexter/dex/evaluation/Metrics.py
+1-1cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
+7-32 files

LLVM/project 640dccccross-project-tests/debuginfo-tests/dexter-tests optnone-vectors-and-functions.cpp optnone-simple-functions.cpp, cross-project-tests/debuginfo-tests/dexter-tests/memvars inlining-dse.c

[Dexter] Update lldb-based dexter-tests to use script-mode

This patch replaces uses of heuristic-mode Dexter in the dexter-tests suite
with uses of the script-mode, for tests that use DAP (via lldb-dap). The
updates are largely straightforward but occasionally non-trivial, and in
some cases some slight modifications have been made to keep the "spirit" of
the test intact.
DeltaFile
+93-73cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
+98-51cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+68-54cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp
+57-33cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp
+30-19cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
+19-22cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining-dse.c
+365-25221 files not shown
+669-39227 files

LLVM/project 44198f0cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb LLDB.py

Fix: Account for weird function name endings in lldb-dap
DeltaFile
+5-0cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
+5-01 files

LLVM/project 7adfd7ccross-project-tests/debuginfo-tests/dexter/dex/evaluation Metrics.py

backport: add optimized out metric
DeltaFile
+7-1cross-project-tests/debuginfo-tests/dexter/dex/evaluation/Metrics.py
+7-11 files

LLVM/project 9a22cc0cross-project-tests/debuginfo-tests/dexter/dex/evaluation Metrics.py

Add irretrievable metric
DeltaFile
+5-0cross-project-tests/debuginfo-tests/dexter/dex/evaluation/Metrics.py
+5-01 files

LLVM/project 6acc564cross-project-tests/debuginfo-tests/dexter/dex/evaluation ExpectMatch.py, cross-project-tests/debuginfo-tests/dexter/dex/test_script Nodes.py

[Dexter] Add ability to check float values within a range

Adds a new node type, !float, which can be used to match debugger ouptut as
float values rather than as strings, optionally allowing a range to be
specified for inexact matches. This new node allows a list of values to be
given, effectively a shorthand for a list of individual !float nodes.
DeltaFile
+109-1cross-project-tests/debuginfo-tests/dexter/dex/test_script/Nodes.py
+68-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/floats.cpp
+12-1cross-project-tests/debuginfo-tests/dexter/dex/evaluation/ExpectMatch.py
+189-23 files

LLVM/project e7db53ccross-project-tests/debuginfo-tests/dexter/dex/evaluation ExpectMatch.py, cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/evaluation eval_sublist_aggregates.cpp eval_sublist_aggregates_addresses.cpp

[Dexter] Allow matching lists of values for aggregate members

This patch slightly extends the matching of aggregate members to allow for
lists of expected values for individual members, functioning the same as
lists of expected values for scalar values.
DeltaFile
+136-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/evaluation/eval_sublist_aggregates.cpp
+54-0cross-project-tests/debuginfo-tests/dexter/feature_tests/scripts/evaluation/eval_sublist_aggregates_addresses.cpp
+8-3cross-project-tests/debuginfo-tests/dexter/dex/evaluation/ExpectMatch.py
+198-33 files

LLVM/project 04e2cc4cross-project-tests/debuginfo-tests/dexter-tests nrvo-string.cpp optnone-simple-functions.cpp, cross-project-tests/debuginfo-tests/dexter/dex/tools TestToolBase.py

[Dexter] Switch to using script-mode by default

This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests have
their flags switched accordingly.
DeltaFile
+3-4cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
+3-3cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
+2-2cross-project-tests/debuginfo-tests/dexter-tests/nrvo-string.cpp
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+2-2cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
+2-2cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py
+14-15168 files not shown
+188-189174 files

LLVM/project 0ecc05across-project-tests/debuginfo-tests/dexter README.md Heuristic.md

[Dexter] Document the structured script model

This patch adds documentation for the script model to the Dexter README,
shunting heuristic-mode information into a separate doc, creating a new
doc for script-mode, and linking to both (with a brief summary of the
differences) from the base README.
DeltaFile
+6-232cross-project-tests/debuginfo-tests/dexter/README.md
+231-0cross-project-tests/debuginfo-tests/dexter/Heuristic.md
+213-0cross-project-tests/debuginfo-tests/dexter/Script.md
+450-2323 files