llvm-project
1f5807eb - [mlir][vector][nfc] Simplify `in_bounds` attr update (#100334)

Commit
1 year ago
[mlir][vector][nfc] Simplify `in_bounds` attr update (#100334) 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.
Author
Parents
Loading