llvm-project/llvm/lib/Transforms/AggressiveInstCombine
Anton Afanasyev bed587631f [AggressiveInstCombine] Add arithmetic shift right instr to `TruncInstCombine` DAG
Add `ashr` instruction to the DAG post-dominated by `trunc`, allowing
`TruncInstCombine` to reduce bitwidth of expressions containing
these instructions.

We should be shifting by less than the target bitwidth.
Also it is sufficient to require that all truncated bits
of the value-to-be-shifted are sign bits (all zeros or ones) and
one sign bit is left untruncated: https://alive2.llvm.org/ce/z/Ajo2__

Part of https://reviews.llvm.org/D107766

Differential Revision: https://reviews.llvm.org/D108355
2021-08-24 10:41:16 +03:00
..
AggressiveInstCombine.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
AggressiveInstCombineInternal.h AggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations. NFC. 2020-06-26 09:58:20 +01:00
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
TruncInstCombine.cpp [AggressiveInstCombine] Add arithmetic shift right instr to `TruncInstCombine` DAG 2021-08-24 10:41:16 +03:00