diff options
| author | Jessica Paquette <jpaquette@apple.com> | 2020-02-03 13:35:09 -0800 |
|---|---|---|
| committer | Jessica Paquette <jpaquette@apple.com> | 2020-02-03 14:27:08 -0800 |
| commit | 37910fd0e1fdd821c71c16572eca815218f54872 (patch) | |
| tree | a6e2f350e7c9317ecd56969e0567a31f72a5333d /clang/lib/Frontend/ASTMerge.cpp | |
| parent | 7d3aace3f52f6b3f87aac432aa41ae1cdeb348eb (diff) | |
| download | llvm-37910fd0e1fdd821c71c16572eca815218f54872.zip llvm-37910fd0e1fdd821c71c16572eca815218f54872.tar.gz llvm-37910fd0e1fdd821c71c16572eca815218f54872.tar.bz2 | |
[AArch64][GlobalISel] Fold G_SHL into TB(N)Z bit calculation
This implements the following optimization:
```
(tbz (shl x, c), b) -> (tbz x, b-c)
```
Which appears in `getTestBitOperand` in AArch64ISelLowering.cpp.
If we test bit `b` of `shl x, c`, we can fold away the `shl` by looking `c` bits
to the right of `b` in `x` when this fits in the type. So, we can just test the
`b-c`th bit.
Differential Revision: https://reviews.llvm.org/D73924
Diffstat (limited to 'clang/lib/Frontend/ASTMerge.cpp')
0 files changed, 0 insertions, 0 deletions
