Skip to content

Commit ae8afb8

Browse files
committed
Changes in code.
Change-Id: I6a6a1d656e5c0b89ff31e1d088815a6cc06dc04f
1 parent b11ed52 commit ae8afb8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

IGC/Compiler/CISACodeGen/CodeSinking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ bool CodeSinking::hoistCongruentPhi(PHINode* phi)
976976
if (apply)
977977
{
978978
auto compareFunc = [](const InstPair& a, const InstPair& b) {
979-
return isInstPrecede(a.first, b.first);
979+
return (a.first == b.first) ? false : isInstPrecede(a.first, b.first);
980980
};
981981
std::sort(instMap.begin(), instMap.end(), compareFunc);
982982

IGC/Compiler/CISACodeGen/helper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ inline bool isInstPrecede(
284284
assert(inst->getParent() == pos->getParent());
285285
if (inst == pos)
286286
{
287-
return false;
287+
return true;
288288
}
289289

290290
auto II = inst->getParent()->begin();

0 commit comments

Comments
 (0)