[Mlir-commits] [mlir] [mlir][EmitC] Allow further ops within expressions (PR #84284)
Simon Camphausen
llvmlistbot at llvm.org
Thu Mar 7 05:15:12 PST 2024
================
@@ -89,11 +97,13 @@ static FailureOr<int> getOperatorPrecedence(Operation *operation) {
}
return op->emitError("unsupported cmp predicate");
})
- .Case<emitc::DivOp>([&](auto op) { return 12; })
- .Case<emitc::MulOp>([&](auto op) { return 12; })
- .Case<emitc::RemOp>([&](auto op) { return 12; })
+ .Case<emitc::DivOp>([&](auto op) { return 13; })
+ .Case<emitc::LogicalAndOp>([&](auto op) { return 4; })
+ .Case<emitc::LogicalNotOp>([&](auto op) { return 15; })
+ .Case<emitc::LogicalOrOp>([&](auto op) { return 3; })
+ .Case<emitc::MulOp>([&](auto op) { return 13; })
+ .Case<emitc::RemOp>([&](auto op) { return 13; })
.Case<emitc::SubOp>([&](auto op) { return 11; })
----------------
simon-camp wrote:
```suggestion
.Case<emitc::SubOp>([&](auto op) { return 12; })
```
https://github.com/llvm/llvm-project/pull/84284
More information about the Mlir-commits
mailing list