LLVM/project 8964a03clang-tools-extra/clang-tidy/modernize RawStringLiteralCheck.cpp, clang-tools-extra/docs ReleaseNotes.md

[clang-tidy] Fix modernize-raw-string-literal crash on raw literal operators (#217229)

Fixes #213891.

Raw user-defined literals like `12_w` can produce a synthetic
`StringLiteral` whose source text is not actually a string literal. This
caused `modernize-raw-string-literal` to look for quotes that were not
present and crash.

Check that the source token is a string literal before analyzing its
source text.

AI assistance: I used ChatGPT and Claude Code for codebase navigation,
investigation, implementation planning, and drafting parts of the
change. I reviewed and tested the final implementation and understand
the submitted changes.
DeltaFile
+17-0clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp
+5-0clang-tools-extra/test/clang-tidy/checkers/modernize/raw-string-literal.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.md
+26-03 files

LLVM/project d5a1778mlir/lib/Dialect/XeGPU/Transforms XeGPULayoutImpl.cpp XeGPUPropagateLayout.cpp, mlir/test/Dialect/XeGPU propagate-layout-subgroup.mlir propagate-layout-subgroup-invalid.mlir

[mlir][xegpu] Report failure when no valid layout can be determined for anchor ops (#214875)

This PR makes XeGPU layout propagation fail immediately when it
encounters an anchor op (store or dpas) that it can't determines its
layout.

It reports an error message at the offending op during propagation step,
rather than leaving the layout unlabeled and letting the problem crash
or misreport in a later pass. So user has better understanding about the
lowering issue.

assisted-by-claude

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
DeltaFile
+90-69mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
+96-0mlir/test/Dialect/XeGPU/propagate-layout-subgroup-invalid.mlir
+0-33mlir/test/Dialect/XeGPU/propagate-layout-subgroup.mlir
+16-6mlir/lib/Dialect/XeGPU/Transforms/XeGPULayoutImpl.cpp
+202-1084 files

LLVM/project e23a247utils/bazel/llvm-project-overlay/clang BUILD.bazel, utils/bazel/llvm-project-overlay/compiler-rt BUILD.bazel

[bazel] Link emutls to interpreter (#218065)

This is needed to fix #209717.
https://github.com/llvm/llvm-project/pull/217700 tries to fix it cleanly
but it's blocked on review. Get this in while we wait for review.
DeltaFile
+9-0utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
+1-0utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+10-02 files

LLVM/project b2a728cllvm/test/CodeGen/NVPTX tcgen05-mma-decompress-b.ll tcgen05-mma-disable-output-lane-decompress-b.ll, llvm/test/Transforms/Reassociate fma-pairs.ll

Rebase

Created using spr 1.3.7
DeltaFile
+407-0llvm/test/Transforms/Reassociate/fma-pairs.ll
+320-0llvm/test/tools/dsymutil/X86/odr-static-member-mixed-spelling.s
+0-264mlir/test/lib/Dialect/Test/TestOps.td
+264-0llvm/test/CodeGen/NVPTX/tcgen05-mma-block-scale-decompress-b.ll
+263-0llvm/test/CodeGen/NVPTX/tcgen05-mma-disable-output-lane-decompress-b.ll
+260-0llvm/test/CodeGen/NVPTX/tcgen05-mma-decompress-b.ll
+1,514-264157 files not shown
+4,373-1,422163 files

LLVM/project 702e02cllvm/lib/Target/AMDGPU SIISelLowering.cpp

Simplify conditionals

Change-Id: Icf37bc23c805e82131a8c67babdef259b03de2ca
DeltaFile
+16-12llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+16-121 files

LLVM/project a57dd60flang/lib/Lower Bridge.cpp, flang/lib/Semantics expression.cpp

[flang][CUDA] Preserve data attrs on assignment RHS (#207849)

Background: The Fortran standard enforces that the right hand side of a
defined assignment be treated as a value by parenthesizing the rhs in
the defined assingment translation: `lhs = rhs` is semantically
equivalent to `user_defined_assignment(lhs, (rhs))`. This would normally
prevent generic resolution from distinguishing defined assignment
procedures based on the variable attributes of any variable used as
`rhs` because the `(rhs)` has no variable attributes.

Cuda Fortran relies on Variable Attributes to track the location of data
between the host and the device. This PR suppresses the parenthesis
insertion during procedure lowering in order to allow overloading
assignment based on device variable attributes of the right hand side
variable. It also bypasses some semantic enforcement of user-defined
assignements that is happening at the HLFIR level by lowering the
assignment to a function call of the defined assignment subroutine
instead of a `hlfir.region_assign` operator.
DeltaFile
+109-0flang/test/Semantics/CUDA/cuf-defined-assignment-rhs.cuf
+77-0flang/test/Lower/CUDA/cuf-defined-assignment-rhs.cuf
+54-6flang/lib/Semantics/expression.cpp
+51-0flang/test/Semantics/CUDA/cuf-defined-assignment-rhs-not-yet-implemented.cuf
+32-5flang/lib/Lower/Bridge.cpp
+323-115 files

LLVM/project 7833755mlir/include/mlir/Dialect/LLVMIR XeVMOps.td, mlir/lib/Conversion/XeVMToLLVM XeVMToLLVM.cpp

[MLIR][XeVM] Add xevm.bitcast_shuffle op and lowering to LLVM (#215303)

Add `xevm.bitcast_shuffle`, matching the SPIR-V
OpSubgroupBitcastShuffleINTEL
instruction from SPV_INTEL_subgroup_bitcast_shuffle. It performs a
bit-preserving
conversion and shuffle of its operand across a subgroup: all invocations
cooperate, the components of the operand are concatenated in
subgroup-local-id
order, and the resulting bit stream is handed back out in chunks the
size of a
result component.

// pack: gather one value per lane out of the components spread across
the subgroup
  %scalar = xevm.bitcast_shuffle %vec : (vector<4xi16>) -> i64
  // unpack: the exact inverse
  %vec2 = xevm.bitcast_shuffle %scalar : (i64) -> vector<4xi16>


    [15 lines not shown]
DeltaFile
+219-0mlir/test/Integration/Dialect/XeVM/GPU/xevm_bitcast_shuffle.mlir
+73-26mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
+85-0mlir/include/mlir/Dialect/LLVMIR/XeVMOps.td
+61-0mlir/test/Dialect/LLVMIR/invalid.mlir
+48-0mlir/test/Conversion/XeVMToLLVM/xevm-to-llvm.mlir
+40-0mlir/test/Dialect/LLVMIR/xevm.mlir
+526-261 files not shown
+548-267 files

LLVM/project 97adc8fllvm/include/llvm/IR IntrinsicsAMDGPU.td, llvm/lib/Target/AMDGPU SIInstructions.td

[AMDGPU] Guard media instruction patterns with target feature

As well as their corresponding intrinsics.
DeltaFile
+1,608-357llvm/test/CodeGen/AMDGPU/sad.ll
+2-273llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mqsad.u32.u8.ll
+2-121llvm/test/CodeGen/AMDGPU/llvm.amdgcn.qsad.pk.u16.u8.ll
+44-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.intrinsics.sad.err.ll
+15-13llvm/lib/Target/AMDGPU/SIInstructions.td
+10-4llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+1,681-7686 files

LLVM/project 6a1dd3dllvm/lib/Target/M68k M68kTargetMachine.cpp

[M68k] Fix build after InstructionSelect rename (#218059)

Done in 8f543c25c44eb175b583bceaa9230dd981cdd463.

Fixes https://lab.llvm.org/buildbot/#/builders/27/builds/3952.
DeltaFile
+1-1llvm/lib/Target/M68k/M68kTargetMachine.cpp
+1-11 files

LLVM/project 9f5b384llvm/test/CodeGen/AMDGPU schedule-fs-loop.ll amdgpu-sw-lower-lds-dynamic-indirect-access.ll, llvm/test/CodeGen/AMDGPU/GlobalISel regbankselect-add.s16.mir

[NFC][AMDGPU] Remove redundant CodeGen test coverage

This PR removes duplicate test files, cases, and RUN commands while preserving all effective coverage.

Deleted files:

- `unexpected-reg-unit-state.mir` duplicates the bar case in `fast-ra-kills-vcc.mir`.
- `schedule-fs-loop.ll` produces the same bitcode and output as `schedule-fs-loop-nested-if.ll`.
- `regbankselect-add.s16.mir` duplicates the first four cases in `regbankselect-add.mir`.
- The dynamic-indirect-access LDS tests duplicate the static-dynamic versions, including their ASAN variants.
- The two removed NextUseAnalysis tests duplicate `sequence_2_loops.mir` and `triple-nested-loops.mir`.

Trimmed test cases:

- Remove generic OR cases from `atomicrmw-xor.ll`; `atomicrmw-or.ll` contains them.
- Remove the fcmp ord case from `fmax_legacy.ll`; `fmin_legacy.ll` contains it.
- Remove `variable_memcpy_caller1` from `lower-mem-intrinsics.ll`; `caller0` provides identical coverage.

Deduplicated test commands:

    [4 lines not shown]
DeltaFile
+0-6,246llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_nested_loops.mir
+0-4,877llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_emit_restore_in_loop_preheader2.mir
+0-262llvm/test/CodeGen/AMDGPU/amdgpu-sw-lower-lds-dynamic-indirect-access-asan.ll
+0-142llvm/test/CodeGen/AMDGPU/amdgpu-sw-lower-lds-dynamic-indirect-access.ll
+0-102llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-add.s16.mir
+0-84llvm/test/CodeGen/AMDGPU/schedule-fs-loop.ll
+0-11,71310 files not shown
+10-11,88816 files

LLVM/project 34aca4bllvm/lib/Target/RISCV RISCVMoveMerger.cpp RISCVInstrInfoZc.td, llvm/lib/Target/RISCV/Disassembler RISCVDisassembler.cpp

[RISCV][NFC] Rename SR07 RegClass to GPRS07 (#218007)
DeltaFile
+3-3llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+3-3llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+2-2llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
+2-2llvm/lib/Target/RISCV/RISCVInstrInfoZc.td
+2-2llvm/lib/Target/RISCV/RISCVInstrInfoXqccmp.td
+12-125 files

LLVM/project 9413219llvm/test/Transforms/SLPVectorizer/AMDGPU store-chain-two-external-users.ll

[SLP] Precommit test to relax store chain user limit (#217990)

Precommit test for https://github.com/llvm/llvm-project/pull/215700
DeltaFile
+502-0llvm/test/Transforms/SLPVectorizer/AMDGPU/store-chain-two-external-users.ll
+502-01 files

LLVM/project b91e4dcbolt/runtime instr.cpp, utils/bazel/llvm-project-overlay/llvm BUILD.bazel

Merge branch 'main' into users/mtrofin/08-12-_wpd_dereference_globalalias_targets
DeltaFile
+12-7bolt/runtime/instr.cpp
+2-0utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+14-72 files

LLVM/project ec7997ellvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

deduplicate signature packing tests
DeltaFile
+40-96llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+40-961 files

LLVM/project f67948allvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp, llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

pack geometry shader output streams independently
DeltaFile
+43-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+17-4llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+60-42 files

LLVM/project a647823llvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp, llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

pack prefix-stable clip and cull distance semantics
DeltaFile
+299-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+127-3llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+426-32 files

LLVM/project 3f6d635llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

update harness
DeltaFile
+15-1llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+15-11 files

LLVM/project 255503cllvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp, llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

handle dynamically indexed prefix-stable ranges
DeltaFile
+67-3llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+63-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+130-32 files

LLVM/project 44d7414llvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp, llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

add basic prefix-stable packing
DeltaFile
+130-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+93-2llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+223-22 files

LLVM/project f1c10bbllvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp, llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

enforce prefix-stable component ordering
DeltaFile
+138-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+21-2llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+159-22 files

LLVM/project 34a98b3llvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp, llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

enforce prefix-stable signature row compatibility
DeltaFile
+255-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+85-25llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+340-252 files

LLVM/project 3bfc4eallvm/docs/DirectX SemanticSignatures.md, llvm/include/llvm/Frontend/HLSL SemanticSignaturePacking.h

add prefix-stable packing API and documentation
DeltaFile
+51-0llvm/docs/DirectX/SemanticSignatures.md
+12-0llvm/include/llvm/Frontend/HLSL/SemanticSignaturePacking.h
+9-0llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+72-03 files

LLVM/project 45b1034llvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp, llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

pack prefix-stable tessellation factors
DeltaFile
+78-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+28-3llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+106-32 files

LLVM/project 36b3b9dllvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp

implement indexed signature packing
DeltaFile
+29-2llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+29-21 files

LLVM/project b8f2ae6llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

simplify signature packing test harness
DeltaFile
+42-58llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+42-581 files

LLVM/project 6556437llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

add indexed signature packing tests
DeltaFile
+118-8llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+118-81 files

LLVM/project 030ba4bllvm/docs/DirectX SemanticSignatures.md, llvm/include/llvm/Frontend/HLSL SemanticSignaturePacking.h

document indexed signature packing
DeltaFile
+27-0llvm/docs/DirectX/SemanticSignatures.md
+2-6llvm/include/llvm/Frontend/HLSL/SemanticSignaturePacking.h
+29-62 files

LLVM/project 57cd7cbllvm/include/llvm/Frontend/HLSL SemanticSignaturePacking.h, llvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp

add a stub indexed signature packing API
DeltaFile
+11-0llvm/include/llvm/Frontend/HLSL/SemanticSignaturePacking.h
+6-0llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+17-02 files

LLVM/project 2358932llvm/include/llvm/Frontend/HLSL SemanticSignaturePacking.h, llvm/lib/Frontend/HLSL SemanticSignaturePacking.cpp

implement stacked sort
DeltaFile
+32-2llvm/lib/Frontend/HLSL/SemanticSignaturePacking.cpp
+3-0llvm/include/llvm/Frontend/HLSL/SemanticSignaturePacking.h
+35-22 files

LLVM/project ae2d3c3llvm/unittests/Frontend HLSLSemanticSignaturePackingTest.cpp

add test cases
DeltaFile
+199-0llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+199-01 files