[llvm-branch-commits] [llvm] TableGen: Parenthesize negated predicate-dag leaves with operators (PR #210652)

Sergei Barannikov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jul 20 00:43:08 PDT 2026


================
@@ -23,7 +23,7 @@ std::string AvailabilityPredicate::lowerCondDag(const Record *Owner,
     if (!DI || !DI->getDef()->isSubClassOf("LibcallPredicate"))
       PrintFatalError(Owner, "predicate dag leaf '" + Leaf.getAsString() +
                                  "' is not a LibcallPredicate");
-    OS << DI->getDef()->getValueAsString("Cond");
+    OS << '(' << DI->getDef()->getValueAsString("Cond") << ')';
----------------
s-barannikov wrote:

Why do it here and not at the call site (when emitting code for `not`)?

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


More information about the llvm-branch-commits mailing list