HomePhabricator

[CorrelatedValuePropagation] Fix prof branch_weights metadata handling for…

Description

[CorrelatedValuePropagation] Fix prof branch_weights metadata handling for SwitchInst

This patch fixes the CorrelatedValuePropagation pass to keep
prof branch_weights metadata of SwitchInst consistent.
It makes use of SwitchInstProfUpdateWrapper.
New tests are added.

Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D62126

Details