[GlobalISel] Combine (logic_op (op x...), (op y...)) -> (op (logic_op x, y))
This implements ``` (logic_op (op x...), (op y...)) -> (op (logic_op x, y)) ``` when `op` is an extend, a shift, or an and. This is similar to `DAGCombiner::hoistLogicOpWithSameOpcodeHands` (with a bunch of missing cases, e.g. G_TRUNC, G_BITCAST, etc.) This is implemented so it works both pre and post-legalization. This also adds a general way to add a series of instructions in a combine. (`applyBuildInstructionSteps`). Differential Revision: https://reviews.llvm.org/D85050
Loading
Please sign in to comment