
LLVM / MLIR
LLVM
MLIR is the compiler infrastructure a lot of ML tooling is built on. These fixes are all the same shape: a transform assumed an input it can't actually count on — a rank match, a return statement, an attribute — and crashed instead of just handling it.
- [mlir][SCF] Fix use-after-free in coalesceLoops when inner loop yields its induction var
Merging two loops into one could leave a dangling reference if the inner loop reused its own counter afterward — fixed the memory bug, not just the crash it caused.
- [mlir][Bufferization] Don't assert in foldMemRefCasts on a func body without func.return
Compiling a function with no return statement crashed this optimization pass outright, instead of just skipping it.
- [mlir][Ptr] Don't assert when the default memory space isn't a MemorySpaceAttrInterface
A pointer-handling pass assumed every memory space carried extra metadata it doesn't always have — it crashed instead of falling back gracefully.
- [mlir][SparseTensor] Fix crash demapping alloc_tensor with a copy operand
Allocating a sparse tensor with a copy attached hit a code path the sparse-layout pass never expected, and crashed the compiler.



