[all-commits] [llvm/llvm-project] bebe6a: [GlobalISel] Combine (logic_op (op x...), (op y......
Jessica Paquette via All-commits
all-commits at lists.llvm.org
Tue Aug 11 10:40:30 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bebe6a6449811e877f7eba3f1798ddd1fa83e440
https://github.com/llvm/llvm-project/commit/bebe6a6449811e877f7eba3f1798ddd1fa83e440
Author: Jessica Paquette <jpaquette at apple.com>
Date: 2020-08-11 (Tue, 11 Aug 2020)
Changed paths:
M llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
M llvm/include/llvm/Target/GlobalISel/Combine.td
M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
M llvm/lib/Target/AArch64/AArch64Combine.td
A llvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-hoist-same-hands.mir
A llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-hoist-same-hands.mir
Log Message:
-----------
[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
More information about the All-commits
mailing list