Skip to content

Commit 6eb5d95

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: c7479bf: Do LVN to flag regsiter mov
Reduce extra flag register mov instructions
1 parent 1fe31c8 commit 6eb5d95

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

visa/Passes/LVN.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,22 +1041,11 @@ bool LVN::addValue(G4_INST *inst) {
10411041

10421042
G4_Operand *dst = inst->getDst();
10431043
if (!dst->getBase() || !dst->getBase()->isRegVar() ||
1044-
(dst->getBase()->asRegVar()->getDeclare()->getRegFile() != G4_GRF &&
1045-
dst->getBase()->asRegVar()->getDeclare()->getRegFile() != G4_FLAG) ||
1044+
dst->getBase()->asRegVar()->getDeclare()->getRegFile() != G4_GRF ||
10461045
dst->getTopDcl()->getAddressed()) {
10471046
return false;
10481047
}
10491048

1050-
// Only handle mov flag, imm
1051-
if (dst->getBase()->asRegVar()->getDeclare()->getRegFile() == G4_FLAG) {
1052-
if (inst->opcode() != G4_mov) {
1053-
return false;
1054-
}
1055-
if (!inst->getSrc(0)->isImm()) {
1056-
return false;
1057-
}
1058-
}
1059-
10601049
if (dst->getBase() && dst->getTopDcl()->isOutput()) {
10611050
return false;
10621051
}

0 commit comments

Comments
 (0)