[PATCH] D150443: [KnownBits] Define and use meet and join operations

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 13 10:16:45 PDT 2023


barannikov88 added a comment.

`meet` and `joint` sound like advanced stuff from something called lattice theory.
Why don't just use overloaded operators?



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:387
     // Only known if known in both the LHS and RHS.
-    Known = KnownBits::commonBits(LHSKnown, RHSKnown);
+    Known = KnownBits::meet(LHSKnown, RHSKnown);
     break;
----------------
`Known = LHS & RHS;`
?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150443/new/

https://reviews.llvm.org/D150443



More information about the llvm-commits mailing list