Skip to content

Commit c4173af

Browse files
weiyu-chengfxbot
authored andcommitted
Re-enable mix mode for SIMD16
Change-Id: I71fc3c4f6e4a048cbb231c01e08dfe8b18793dd7
1 parent 3fc399d commit c4173af

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

visa/Gen4_IR.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,10 +1804,13 @@ bool G4_INST::canPropagateTo(G4_INST *useInst, Gen4_Operand_Number opndNum, MovT
18041804

18051805
if (isMixedMode())
18061806
{
1807-
if (getExecSize() > 8 || useInst->getExecSize() > 8)
1807+
// FIXME: what's this for?
1808+
if (execSize < 16 && MT == FPDownConvSafe && useInst->execSize == 16 &&
1809+
!useInst->isMixedMode())
18081810
{
18091811
return false;
18101812
}
1813+
18111814
G4_opcode useOp = useInst->opcode();
18121815

18131816
if (useOp != G4_mov &&
@@ -2207,10 +2210,6 @@ bool G4_INST::canHoistTo( G4_INST *defInst, bool simdBB)
22072210

22082211
if (isMixedMode())
22092212
{
2210-
if (getExecSize() > 8 || defInst->getExecSize() > 8)
2211-
{
2212-
return false;
2213-
}
22142213
G4_opcode defOp = defInst->opcode();
22152214

22162215
if (defOp != G4_mov &&
@@ -3501,7 +3500,7 @@ void G4_INST::emitDefUse(std::ostream& output)
35013500

35023501
bool G4_INST::isMixedMode() const
35033502
{
3504-
if (mayExceedTwoGRF())
3503+
if (mayExceedTwoGRF() || !getDst())
35053504
{
35063505
return false;
35073506
}
@@ -3515,8 +3514,8 @@ bool G4_INST::isMixedMode() const
35153514

35163515
G4_Type srcType = tOpnd->getType();
35173516

3518-
if (getDst() &&
3519-
(getDst()->getType() == builder.getMixModeType() || srcType == builder.getMixModeType()) &&
3517+
// FIXME: this includes int <-> HF type conversion, which is probably not the intention of the function..
3518+
if ((getDst()->getType() == builder.getMixModeType() || srcType == builder.getMixModeType()) &&
35203519
getDst()->getType() != srcType)
35213520
{
35223521
return true;

0 commit comments

Comments
 (0)