[SimplifyCFG] simplifySingleResume(): FoldReturnIntoUncondBranch() already knows...
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 19 Dec 2020 15:09:10 +0000 (18:09 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 19 Dec 2020 21:18:34 +0000 (00:18 +0300)
commit83659c707675f81680e355d98bd3600cd59a9278
tree6ccf8c0d9e25d2bd58053706aa704044ccaa7331
parentb7d00e29b772511da268643488fde8af3645e5d2
[SimplifyCFG] simplifySingleResume(): FoldReturnIntoUncondBranch() already knows how to preserve DomTree

... so just ensure that we pass DomTreeUpdater it into it.

Apparently, there were no dedicated tests just for that functionality,
so i'm adding one here.
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/duplicate-ret-into-uncond-br.ll [new file with mode: 0644]