HomePhabricator

[SimpleLoopUnswich] Fixa a bug on ComputeUnswitchedCost with partial unswitch

Authored by jaykang10 on Jun 7 2021, 4:55 AM.

Description

[SimpleLoopUnswich] Fixa a bug on ComputeUnswitchedCost with partial unswitch

There was a bug from cost calculation for partially invariant unswitch.

The costs of non-duplicated blocks are substracted from the total LoopCost, so
anything that is duplicated should not be counted.

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