Skip to content

Commit febe5f4

Browse files
itetyush-intelsys_zuul
authored and
sys_zuul
committed
add check for incremention conditional flag life ranges
Change-Id: Ib8b8c45d5f5181a6de1fa17083b921e09df959d8
1 parent 5826f58 commit febe5f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

visa/Optimizer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3704,6 +3704,13 @@ bool Optimizer::foldCmpToCondMod(G4_BB* bb, INST_LIST_ITER& iter)
37043704

37053705
auto cmpIter = std::find(iter, bb->end(), cmpInst);
37063706

3707+
// check if cmp instruction is close enough
3708+
constexpr int DISTANCE = 60;
3709+
if (std::distance(iter, cmpIter) > DISTANCE)
3710+
{
3711+
return false;
3712+
}
3713+
37073714
auto isSupportedCondMod = [](G4_CondModifier mod)
37083715
{
37093716
return mod == Mod_g || mod == Mod_ge || mod == Mod_l || mod == Mod_le ||

0 commit comments

Comments
 (0)