As noted in PR18355, this patch makes it clear that all cases with undef operands have been handled before further constant folding is attempted.
|1001–1003 ↗||(On Diff #51133)|
I don't like this because it will silently accept newly added binary operators.
Updated so that we assert on unhandled binary instructions with undef operands.
At present we don't handle float binary instructions so I've split these off with a TODO comment instead of asserting - this patch is about clarity not adding the extra handling support.
Moved isBinaryOp assert to start of function - with that done we can remove the 'default' option for undef handling and just assert afterward that neither operand is undef, this will pick up any current/future binary instructions that we don't handle undefs for.