[llvm] [TableGen] Make `!and` and `!or` short-circuit (PR #113963)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 12:02:47 PDT 2024


================
@@ -1543,6 +1543,23 @@ const Init *BinOpInit::resolveReferences(Resolver &R) const {
   const Init *lhs = LHS->resolveReferences(R);
   const Init *rhs = RHS->resolveReferences(R);
 
+  if (getOpcode() == AND) {
----------------
mshockwave wrote:

The short-circuit for `!or` against all ones was just added.

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


More information about the llvm-commits mailing list