[SSAUpdaterImpl] Do not generate phi node with all the same incoming values
authorSerguei Katkov <serguei.katkov@azul.com>
Fri, 27 May 2022 07:51:31 +0000 (14:51 +0700)
committerSerguei Katkov <serguei.katkov@azul.com>
Fri, 3 Jun 2022 05:24:33 +0000 (12:24 +0700)
commit24e16e4af20858e0c276d3cf4137b7a57afd2d19
tree701ec26c2d538e43c5a1cef5ca50b7c90023afd5
parent614567a7bf4a7a4c2570ad9a499b77155dfb54ce
[SSAUpdaterImpl] Do not generate phi node with all the same incoming values

If all available vals to basic block are the same - do not build new phi node and
just use this value.

Reviewed By: sameerds
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D126525
llvm/include/llvm/Transforms/Utils/SSAUpdaterImpl.h
llvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir
llvm/test/CodeGen/AMDGPU/nested-loop-conditions.ll
llvm/test/CodeGen/WebAssembly/lower-em-ehsjlj.ll
llvm/test/Transforms/LICM/sink-debuginfo-preserve.ll