<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/151679>151679</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[bug][MLIR][SVE] SVE matmul integration test crashes with larger input sizes (≥128)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Dasor
</td>
</tr>
</table>
<pre>
The SVE matmul integration test found [here](https://github.com/llvm/llvm-project/blob/main/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/matmul.mlir) crashes when using larger matrix sizes.
I've been testing with square matrices, and sizes ≤64 consistently work fine. However, crashes begin to occur somewhere above that. 96×96 always crashes, but 96 is not a magic threshold, I haven't exhaustively bisected the exact failure point, so it's possible that some sizes between 64 and 96 may also fail.
The crash seems to result from an out-of-bounds memory access. For instance, in the 128×128 case, it fails on the following instruction:
```asm
sturb w25, [x28, #-16]
```
Where the value of `x28` is `0xFFFFFF800000`, which appears to be a clearly invalid pointer.
Maybe @nujaa @MacDue @banach-space can help?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVMGO4zYM_RrlQkxgK7ZjH3zITNboALtA0W23Z0pmbG1lKRWlZNKvL2TPdHsqUCGAhFjviXzkIzKbyRH1on4W9XmHKc4-9GdkH3bKj4_-15ng67dPsGBckgXjIk0Bo_EOInGEi09uBFE_zxRI1Gch2znGK4vDSchByGEycU5qr_0i5GDt7WN7ugb_nXQUclDWKyGHBY3LmzVByCGzCzm8_nhQyOFs0G6Yz8ahnYQcXn7-TcjhFJav3z6tJDnO_UbSgQ7IMzHcZ3KQ2LgJLIaJQk4omDdg8xfxHkRxEsXpVcjjjUARbdnl63cTZ-A_EwbaMJpYyBdAN25gEJ-kaDtxqpoKtHdsOJKL9gF3H_6Ai3G0h5_8nW4UMvAjJEWTcRA9eK1TAPYL3bOIgMrfCOKMcQ9dI14Oojt2D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