HomePhabricator

[JumpThreading] Fix branch probabilities in DuplicateCondBranchOnPHIIntoPred()

Authored by yrouban on Nov 16 2020, 11:24 PM.

Description

[JumpThreading] Fix branch probabilities in DuplicateCondBranchOnPHIIntoPred()

When instructions are cloned from block BB to PredBB in the method
DuplicateCondBranchOnPHIIntoPred() number of successors of PredBB
changes from 1 to number of successors of BB. So we have to copy
branch probabilities from BB to PredBB.

Reviewed By: Kazu Hirata

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

Details