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
Differential D101141
[SimplifyCFG] Preserve metadata when unconditionalizing branches (constant condition). Meinersbur on Apr 23 2021, 12:14 AM. Authored by
Details 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
Diff Detail
Unit Tests Event TimelineComment Actions The diff seems to be reverse from what you intended?
Comment Actions This LGTM, thank you.
|
Shouldn't we also take care of the metadata here ?