[Mlir-commits] [mlir] [mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (PR #112143)
Tobias Gysi
llvmlistbot at llvm.org
Mon Oct 14 01:26:22 PDT 2024
================
@@ -1192,12 +1200,21 @@ LogicalResult verifyCallOpVarCalleeType(OpTy callOp) {
template <typename OpType>
static LogicalResult verifyOperandBundles(OpType &op) {
OperandRangeRange opBundleOperands = op.getOpBundleOperands();
- ArrayRef<std::string> opBundleTags = op.getOpBundleTags();
+ std::optional<ArrayAttr> opBundleTags = op.getOpBundleTags();
- if (opBundleTags.size() != opBundleOperands.size())
+ if (opBundleTags) {
+ for (Attribute tagAttr : *opBundleTags) {
+ if (!llvm::isa<StringAttr>(tagAttr))
----------------
gysit wrote:
```suggestion
if (!isa<StringAttr>(tagAttr))
```
nit: llvm::all_of may be nice here?
https://github.com/llvm/llvm-project/pull/112143
More information about the Mlir-commits
mailing list