[AggressiveInstCombine] Add `phi` nodes support to `TruncInstCombine`
authorAnton Afanasyev <anton.a.afanasyev@gmail.com>
Wed, 15 Sep 2021 06:19:53 +0000 (09:19 +0300)
committerAnton Afanasyev <anton.a.afanasyev@gmail.com>
Wed, 23 Feb 2022 11:01:55 +0000 (14:01 +0300)
commitf84d732f8c1737940afab71824134f41f37a048b
tree33017092bc4b20307bb434229fa4d74314e94ed2
parente2f627e5e3855309f3a7421f6786b401efb6b7c7
[AggressiveInstCombine] Add `phi` nodes support to `TruncInstCombine`

Expand `TruncInstCombine` to handle loops by adding `phi` nodes
to expression graph.

Reviewed by: RKSimon, lebedev.ri

Differential Revision: https://reviews.llvm.org/D109817
llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
llvm/test/Transforms/AggressiveInstCombine/trunc_phi.ll