Skip to content

Commit 02e2f5b

Browse files
weiyu-chenigcbot
authored andcommitted
Enable float accumualator for sel, second try.
1 parent 4c0d9b1 commit 02e2f5b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

visa/AccSubstitution.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,11 @@ bool AccSubPass::isAccCandidate(G4_INST* inst, int& lastUse, bool& mustBeAcc0, i
441441
return false;
442442
}
443443

444-
if (inst->getCondMod())
444+
if (inst->getCondMod() && inst->opcode() != G4_sel)
445445
{
446446
// since our du-chain is on inst instead of operand, the presence of conditional modifier complicates the checks later.
447447
// This is somewhat conservative but shouldn't matter too much as inst with both dst and conditional modifiers are rare.
448+
// Exception is for sel as flag register is not updated.
448449
return false;
449450
}
450451

visa/Gen4_IR.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7980,13 +7980,15 @@ bool G4_INST::canDstBeAcc() const
79807980
case G4_rnde:
79817981
case G4_rndu:
79827982
case G4_rndz:
7983-
case G4_sel:
79847983
case G4_shr:
79857984
case G4_smov:
79867985
case G4_xor:
79877986
case G4_rol:
79887987
case G4_ror:
79897988
return true;
7989+
case G4_sel:
7990+
// sel seems to fail with int acc for some strange reason (sign extension?)
7991+
return getCondMod() ? IS_TYPE_FLOAT_ALL(dst->getType()) : true;
79907992
case G4_cmp:
79917993
case G4_cmpn:
79927994
// disable for now since it's causing some SKL tests to fail

0 commit comments

Comments
 (0)