We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b11ed52 commit ae8afb8Copy full SHA for ae8afb8
IGC/Compiler/CISACodeGen/CodeSinking.cpp
@@ -976,7 +976,7 @@ bool CodeSinking::hoistCongruentPhi(PHINode* phi)
976
if (apply)
977
{
978
auto compareFunc = [](const InstPair& a, const InstPair& b) {
979
- return isInstPrecede(a.first, b.first);
+ return (a.first == b.first) ? false : isInstPrecede(a.first, b.first);
980
};
981
std::sort(instMap.begin(), instMap.end(), compareFunc);
982
IGC/Compiler/CISACodeGen/helper.h
@@ -284,7 +284,7 @@ inline bool isInstPrecede(
284
assert(inst->getParent() == pos->getParent());
285
if (inst == pos)
286
287
- return false;
+ return true;
288
}
289
290
auto II = inst->getParent()->begin();
0 commit comments