Skip to content

Commit 05042d1

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: ae382b7: Fix pixel shader input sinking in CodeSinking
CodeSinking moves input intrinsics before their first uses in the target basic block. Phi instructions should not be treated as valid uses in the currect block as their use is actually in a predecessor block.
1 parent db565ec commit 05042d1

File tree

2 files changed

+1
-52
lines changed

2 files changed

+1
-52
lines changed

IGC/Compiler/CISACodeGen/CodeSinking.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ static BasicBlock *findLowestSinkTarget(Instruction *inst, SmallPtrSetImpl<Instr
138138
break;
139139
}
140140
}
141-
142141
BasicBlock *curBlk = inst->getParent();
143142
Loop *curLoop = LI->getLoopFor(inst->getParent());
144143
while (tgtBlk && tgtBlk != curBlk) {
@@ -152,7 +151,7 @@ static BasicBlock *findLowestSinkTarget(Instruction *inst, SmallPtrSetImpl<Instr
152151
// Determine the block of the use.
153152
Instruction *useInst = cast<Instruction>(*I);
154153
BasicBlock *useBlock = useInst->getParent();
155-
if (useBlock == tgtBlk && !isa<PHINode>(useInst)) {
154+
if (useBlock == tgtBlk) {
156155
usesInBlk.insert(useInst);
157156
}
158157
}

IGC/Compiler/tests/CodeSinking/input-in-loop.ll

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)