<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/70999>70999</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Emulating narrow ints on subview doesn't work for dynamic offsets
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
saienduri
</td>
</tr>
</table>
<pre>
Here is an example MLIR that throws this error:
nt64_t mlir::detail::OffsetSizeAndStrideOpInterfaceTrait::getStaticOffset(unsigned int) [with ConcreteOp = mlir::memref::SubViewOp; int64_t = long int]: Assertion `!(*static_cast<ConcreteOp *>(this)).isDynamicOffset(idx) && "expected static offset"' failed.
```
func.func @foo(%arg1 : index) {
%arr = memref.alloc() : memref<128xi4>
%subview = memref.subview %arr[%arg1] [32] [1] : memref<128xi4> to memref<32xi4, strided<[1], offset:?>>
return
}
```
It looks like emulating narrow ints on subview have limited support, supporting only static offset and size and stride of 1. It would be great to get support for this.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVFFvpDgM_jXhxdoRGIaBBx6mMzu6SneqdD3d6yqAgVxDghLTaffXnxKm1zmp0kooGCef_fmzg_RejYaoEfsHsT8ncuXJusZLRaZfnUpa2783v5EjUB6kAXqT86IJ_vj98U_gSTLw5OzVA0_KAzlnnciPINKzSI_bargsfjDMWoUtkR97Yqn0Zj8Ngyd-Vj_paPpndqqnp-XRMLlBdvSXk4q3gyPxM0tW3YYQWK0mcu9BGRZYg9g_XBVPcLKmc8T0tIDIz3d5Z5odDZv9vLZ_K7o-LSJ_CAEixXBcWzPGiPtzKOToPTlW1oAoU4GZwErg0UcmPzrpWeSn-4R4FPl3gVWQQ2AtsN4pf343cr5jrvq3SBhLgSUIRHpbqGPqYQsM9nYSBR5gkEpTv7uXNHDZnvg5rKbbhQVEkQ7WRpJ76cYMQg3K9LQlPDxsAIC47zaBoiw7qbXtIrKOqA-1ThlWb6oIZX1i_dq-Krre4_9zxchhnjYKYn8OrcnxZmyOLxMA209vjsGJJ_BxKnqRn27o4LwpFHp5CdQ-2Tni1ZmbTofzl4Jt6yODtvbFg1YvBDSvWrIyIxjpnL2GIfBgDXwUNslXAq1mFRu1Lot1HPltZkBao9__30OQpgevftJmxFLADpDt4JHhalfdQ0swOgpXycJI_BEQBuvitbq1PumbvK_zWibUZGVdVYcK6yKZGrnPsBgwTUuq2hIz2R6qcqC8HlpMUcpENZhinmVphoiHIt_Joipb6uSQDXU1DJkoUpql0jutX-eddWOivF-pOaR1XSdatqR9_EUgGrpC3AzTuT8nrgmYb-06elGkWnn2n1FYsabm-6-U7S15I_AQBHEvse5-uzI3FX2yOt1MzIsPLceLwMuoeFrbXWdngZeQ8fb6tjj7D3Us8BJ5eoGXWMe_AQAA__9LUIq_">