[MLIR][XeGPU] Fix XeGPUToXeVM crash on non-integer memref memory spaces (#211053)
## Summary
`convert-xegpu-to-xevm` asserts/crashes when a memref's memory space
isn't an
`IntegerAttr` — e.g. `memref<1024xf32,
#spirv.storage_class<StorageBuffer>>`.
`LoadStoreToXeVMPattern` and `PrefetchToXeVMPattern` compute the LLVM
pointer
address space via the deprecated `MemRefType::getMemorySpaceAsInt()`,
which
asserts on anything but an integer. Memref memory spaces aren't
integer-only
in general (GPU address spaces and XeVM's own `xevm::AddrSpaceAttr` are
both
legal here) — the file's own `isSharedMemRef` already handles this
correctly
elsewhere, these three call sites just didn't.
[30 lines not shown]
[CodeGen] Fix -fsanitize=array-bounds for __sized_by / _or_null pointers
`EmitCountedByBoundsChecking()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.
In particular:
* __sized_by / __sized_by_or_null: the loaded bound is a byte count, but the
element index was compared against it directly, so an access was only
flagged once the index exceeded the byte count -- missing out-of-bounds
accesses for a pointee larger than one byte. Scale the index to bytes
('index * sizeof(element)') before comparing. counted_by counts elements
and is unchanged; a void (or otherwise zero-sized) pointee uses the GNU
[15 lines not shown]
[CodeGen] Fix __builtin_dynamic_object_size for __sized_by / _or_null pointers
`emitCountedByPointerSize()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.
In particular:
* __sized_by / __sized_by_or_null: the attribute argument is a byte count,
but the object size was computed as count * sizeof(*ptr), over-reporting by
the element size for any pointee larger than one byte. Use the count
directly for the byte-counting variants.
* __counted_by_or_null / __sized_by_or_null: a null pointer describes no
[22 lines not shown]
[AMDGPU][GISel] Add RegBankLegalize rules for amdgcn_tanh (#214051)
Enable the existing gfx1250 and gfx13 GlobalISel coverage now that tanh
operands are assigned to VGPRs.
[AMDGPU][Clang] Handle instantiation-dependent fence arguments (#214294)
Refactor atomic builtin checks into their switch case and defer constant
evaluation of dependent arguments until instantiation, avoiding a
potential crash during template definition.
Fixes ROCM-29058.
workflows: Merge release-doxygen into release-documenation
These two workflows use the same script and have the same structure,
so it's easier just to have one job that builds both.
[InstCombine] Allow detection of nsz on phi in fcmp+select to min/max (#214156)
The nsz could be coming from the phi, so check for
canIgnoreSignBitOfZero first. Fixes a regression from #213133.