[llvm] [InstCombine] Canonicalize complex boolean expressions into ~((y | z) ^ x) via 3-input truth table (PR #149530)
Madhur Amilkanthwar via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 1 02:39:05 PDT 2025
================
@@ -50,6 +51,229 @@ static Value *getFCmpValue(unsigned Code, Value *LHS, Value *RHS,
return Builder.CreateFCmpFMF(NewPred, LHS, RHS, FMF);
}
+/// This is to create optimal 3-variable boolean logic from truth tables.
+/// currently it supports the cases pertaining to the issue 97044. More cases
+/// can be added based on real-world justification for specific 3 input cases.
+static Value *createLogicFromTable3Var(const std::bitset<8> &Table, Value *Op0,
----------------
madhur13490 wrote:
Rather than mentioning issue number, you can be specific about what cases the fuction handles. At least a high-level summary is fine.
s/currently/Currently.
https://github.com/llvm/llvm-project/pull/149530
More information about the llvm-commits
mailing list