================
@@ -1599,6 +1599,14 @@ LogicalResult cir::VecShuffleOp::verify() {
<< " and " << getResult().getType() << " don't match";
}
+ const uint64_t maxValidIndex =
+ getVec1().getType().getSize() + getVec2().getType().getSize() - 1;
+ for (const auto &idxAttr : getIndices().getAsRange<cir::IntAttr>()) {
----------------
bcardosolopes wrote:
Maybe replace the `for `here by
```
if (llvm::any_of(getIndices().getAsRange<cir::IntAttr>(),
[&](cir::IntAttr idxAttr) {
return idxAttr.getSInt() != -1 && idxAttr.getUInt() > maxValidIndex;
}) emitError(...);
```
https://github.com/llvm/llvm-project/pull/143262
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits