File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1041,11 +1041,22 @@ 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 ||
1044+ (dst->getBase ()->asRegVar ()->getDeclare ()->getRegFile () != G4_GRF &&
1045+ dst->getBase ()->asRegVar ()->getDeclare ()->getRegFile () != G4_FLAG) ||
10451046 dst->getTopDcl ()->getAddressed ()) {
10461047 return false ;
10471048 }
10481049
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+
10491060 if (dst->getBase () && dst->getTopDcl ()->isOutput ()) {
10501061 return false ;
10511062 }
You can’t perform that action at this time.
0 commit comments