This commit is contained in:
William S. Moses 2025-08-22 06:53:37 -05:00
parent d1600dd465
commit 0e07cb92c7

View File

@ -473,15 +473,9 @@ bool mlir::affine::isValidSymbol(Value value, Region *region) {
return true;
// `Pure` operation that whose operands are valid symbolic identifiers.
if (isPure(defOp)) {
bool allValid = true;
for (auto operand : defOp->getOperands()) {
if (!affine::isValidSymbol(operand, region)) {
allValid = false;
break;
}
}
if (allValid)
if (isPure(defOp) && llvm::all_of(defOp->getOperands(), [&](Value operand) {
return affine::isValidSymbol(operand, region);
})) {
return true;
}