Commit 85887d2
committed
[mlir][vector][nfc] Simplify
Since the `in_bounds` attribute is mandatory, there's no need for logic
like this (`readOp.getInBounds()` is guaranteed to return a non-empty
ArrayRef):
```cpp
ArrayAttr inBoundsAttr =
readOp.getInBounds()
? rewriter.getArrayAttr(
readOp.getInBoundsAttr().getValue().drop_back(dimsToDrop))
: ArrayAttr();
```
Instead, we can do this:
```cpp
ArrayAttr inBoundsAttr = rewriter.getArrayAttr(
readOp.getInBoundsAttr().getValue().drop_back(dimsToDrop));
```
This is a small follow-up for #97049 - this change should've been
included there.in_bounds attr update1 parent a213edd commit 85887d2
1 file changed
+4
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1321 | 1321 | | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
| 1324 | + | |
| 1325 | + | |
1329 | 1326 | | |
1330 | 1327 | | |
1331 | 1328 | | |
| |||
1415 | 1412 | | |
1416 | 1413 | | |
1417 | 1414 | | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
| 1415 | + | |
| 1416 | + | |
1423 | 1417 | | |
1424 | 1418 | | |
1425 | 1419 | | |
| |||
0 commit comments