[Mlir-commits] [mlir] [mlir][emitc] Mark emitc.literal with CExpression (PR #155582)

Simon Camphausen llvmlistbot at llvm.org
Wed Aug 27 04:29:09 PDT 2025


================
@@ -98,6 +98,7 @@ static FailureOr<int> getOperatorPrecedence(Operation *operation) {
       .Case<emitc::ConditionalOp>([&](auto op) { return 2; })
       .Case<emitc::DivOp>([&](auto op) { return 13; })
       .Case<emitc::LoadOp>([&](auto op) { return 16; })
+      .Case<emitc::LiteralOp>([&](auto op) { return 16; })
----------------
simon-camp wrote:

IIRC the literals itself doesn't care about precedence, so it acts Like having highest precedence and this (or maybe 17?) is fine.

https://github.com/llvm/llvm-project/pull/155582


More information about the Mlir-commits mailing list