[SimplifyCFG] Preserve !annotation in FoldBranchToCommonDest.
authorFlorian Hahn <flo@fhahn.com>
Thu, 17 Dec 2020 13:42:29 +0000 (13:42 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 17 Dec 2020 14:06:58 +0000 (14:06 +0000)
commit75c04bfc61d6cc5623eadd8a04f86c315dacd823
tree42b6f661a70e6161fb9ded4de42be08f6819d751
parent01383999037760288f617e24084991eaf6bd9272
[SimplifyCFG] Preserve !annotation in FoldBranchToCommonDest.

When folding a branch to a common destination, preserve !annotation on
the created instruction, if the terminator of the BB that is going to be
removed has !annotation. This should ensure that !annotation is attached
to the instructions that 'replace' the original terminator.

Reviewed By: jdoerfert, lebedev.ri

Differential Revision: https://reviews.llvm.org/D93410
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/annotations.ll