Extract the logic for doing reassociations
from DAGCombiner::reassociateOps into a helper
function DAGCombiner::reassociateOpsCommutative,
and use that helper to trigger reassociation
on the original operand order, or the commuted
operand order.
Codegen is not identical since the operand order will
be different when doing the reassociations for the
commuted case. That causes some unfortunate churn in
some test cases. Apart from that this should be NFC.
ReassociateOpsCommutative -> reassociateOpsCommutative (lowerCamelCase)
Please fix the existing "ReassociateOps" as part of this patch or as a preliminary cleanup too. If we keep using the wrong formatting based on existing code, we'll never converge on the right formatting. :)