[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.
[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>
[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.
[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.
[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]
[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]