HomePhabricator

[SimplifyCFG] Preserve metadata when unconditionalizing branches (constant…

Authored by Meinersbur on Apr 26 2021, 8:52 AM.

Description

[SimplifyCFG] Preserve metadata when unconditionalizing branches (constant condition).

When replacing a conditional branch by an unconditional one because the condition is a constant, transfer the metadata to the new branch instruction.

Part of fix for llvm.org/PR50060

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D101141