You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logical AND is easy to implement using affine sets, but there are no corresponding operations in MLIR to write logical OR expressions in if condition. Considering if (cond1 || cond2) foo();, there are two possible solutions to rewrite:
Use cascaded if operation, which requires copying the then block multiple times.
if (cond1) {
foo();
} elseif (cond2) {
foo();
} else {
// do nothing
}
Use NOT operation to transform the condition into AND form, but this requires implementing the NOT operation and negating the conditions. The short circuit property also does not preserve [Op] SelectOp short-circuit evaluation #65.
if (!(!cond1 && !cond2))
foo()
The text was updated successfully, but these errors were encountered:
Logical AND is easy to implement using affine sets, but there are no corresponding operations in MLIR to write logical OR expressions in
if
condition. Consideringif (cond1 || cond2) foo();
, there are two possible solutions to rewrite:if
operation, which requires copying thethen
block multiple times.The text was updated successfully, but these errors were encountered: