Skip to content

Commit 623c16b

Browse files
pratikasharigcbot
authored andcommitted
src0 and src1 of mul or mac cannot be acc.
src0 and src1 of mul or mac cannot be acc.
1 parent 1abde50 commit 623c16b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

visa/Passes/AccSubstitution.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -632,18 +632,15 @@ bool AccSubPass::replaceDstWithAcc(G4_INST* inst, int accNum)
632632
}
633633
}
634634

635-
if (builder.relaxedACCRestrictions())
635+
if (builder.relaxedACCRestrictions2())
636636
{
637637
// mul/mac can't have both sources be acc
638638
// Note that we only need to check for explicit mac here since we will not change mad to mac
639-
if (!builder.relaxedACCRestrictions_1())
639+
if (useInst->opcode() == G4_mul || useInst->opcode() == G4_mac)
640640
{
641-
if (useInst->opcode() == G4_mul || useInst->opcode() == G4_mac)
641+
if (useInst->getSrc(0)->isAccReg() || useInst->getSrc(1)->isAccReg())
642642
{
643-
if (useInst->getSrc(0)->isAccReg() || useInst->getSrc(1)->isAccReg())
644-
{
645-
return false;
646-
}
643+
return false;
647644
}
648645
}
649646
}

0 commit comments

Comments
 (0)