Describe the bug
When an operand of a boolean || or && (or a reconvergent if / else if condition) is only observable when a sibling operand has its non-absorbing value (0 for or, 1 for and), the IR optimizer does not use that fact to simplify the operand's fanin, and redundant references to the sibling inside the operand are kept.
Small cases are caught incidentally by BooleanSimplificationPass when the whole expression has at most 3 inputs and simplifies to a single and/or/nand/nor/xor (e.g. c0 || (a && !c0) → or(c0, a)), but not otherwise.
To Reproduce
In c0 || (a && !c0 && b), the right-hand side of || only affects the result when c0 == 0, so !c0 is redundant and the expression is equivalent to c0 || (a && b). Unlike the 2-variable case, c0 | (a & b) is not a single n-ary op, so BooleanSimplificationPass doesn't simplify it, and nothing else removes c0 from the inner term.
pub fn repro_or(c0: bool, a: bool, b: bool) -> bool {
c0 || (a && !c0 && b)
}