SPU LLVM: Avoid sinking stores out of non-loops

This commit is contained in:
Elad Ashkenazi 2024-06-18 16:43:20 +03:00
parent 5b973448bf
commit f228ca7961

View file

@ -2340,6 +2340,7 @@ public:
}
bool has_gpr_barriers_in_the_way = false;
bool potential_loop = false;
for (auto [a2, b2] : sucs)
{
@ -2351,6 +2352,7 @@ public:
break;
}
potential_loop = true;
continue;
}
@ -2390,6 +2392,7 @@ public:
break;
}
potential_loop = true;
continue;
}
@ -2424,6 +2427,12 @@ public:
continue;
}
if (!potential_loop)
{
spu_log.trace("Avoided postponing r%u store from block 0x%x (not loop)", i, block_q[bi].first);
continue;
}
for (auto [a2, b2] : sucs)
{
if (b2 != bqbi)