[PATCH] D142803: [ComplexLogicCombine 1/?] Implement a general way to simplify complex logical operations.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 10:43:51 PST 2023
spatel added a comment.
I like the test progression now. You could pre-commit the baseline file.
Can you replace the example in the code comment in LogicalExpr.h with the steps used to solve `@leaf3_complex_ret_leaf`?
That's a smaller test, but it seems like it covers many interesting reductions. If that's still too big to be a good introduction, then make it smaller.
The first line should be the expression in logical form using the usual C logic operators:
((a & b) | (a ^ c)) ^ (!(b & c) & a)
Next line: show how that is expanded to a logic form suitable for boolean ring - 'or' becomes 'and' and 'xor', so (make sure this is correct):
(((a & b) & (a ^ c)) ^ (a & b) ^ (a ^ c)) ^ (((b & c) ^ -1) & a)
Is convert to ring masks/operators the next step (or is this 2 steps)?
(((001 * 010) * (001 + 100)) + (001 * 010) + (001 + 100)) + (((010 * 100) + ???) * 001
Now go through each distributive, associative, destructive step just like the code would do and describe it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142803/new/
https://reviews.llvm.org/D142803
More information about the llvm-commits
mailing list