Skip to content

Commit ea969d0

Browse files
DianaChensys_zuul
authored andcommitted
Fix BinaryEncodingIGA::getIGAType
Change-Id: Iee29cc2b6e63ca98b6299fcd5f53af92cfc7035b
1 parent af5f054 commit ea969d0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

visa/BinaryEncodingIGA.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ void BinaryEncodingIGA::translateInstructionDst(
768768
G4_DstRegRegion* dst = g4inst->getDst();
769769
DstModifier dstModifier = getIGADstModifier(g4inst->getSaturate());
770770
Region::Horz hstride = getIGAHorz(dst->getHorzStride());
771-
Type type = getIGAType(dst->getType());
771+
Type type = getIGAType(dst->getType(), platform);
772772

773773
// workaround for SKL bug
774774
// not all bits are copied from immediate descriptor
@@ -904,7 +904,7 @@ void BinaryEncodingIGA::translateInstructionSrcs(
904904
// let IGA take care of types for send/s instructions
905905
if (!igaInst->getOpSpec().isSendOrSendsFamily())
906906
{
907-
type = getIGAType(src->getType());
907+
type = getIGAType(src->getType(), platform);
908908
}
909909
else if (i == 0 && platform >= GENX_SKL && platform < GENX_ICLLP)
910910
{
@@ -964,7 +964,7 @@ void BinaryEncodingIGA::translateInstructionSrcs(
964964
}
965965
else if (src->isImm())
966966
{
967-
Type type = getIGAType(src->getType());
967+
Type type = getIGAType(src->getType(), platform);
968968
ImmVal val;
969969
val = src->asImm()->getImm();
970970
val.kind = getIGAImmType(src->getType());
@@ -1167,7 +1167,7 @@ iga::RegName BinaryEncodingIGA::getIGAARFName(G4_ArchRegKind areg)
11671167
}
11681168
}
11691169

1170-
iga::Type BinaryEncodingIGA::getIGAType(G4_Type type)
1170+
iga::Type BinaryEncodingIGA::getIGAType(G4_Type type, TARGET_PLATFORM genxPlatform)
11711171
{
11721172
switch (type)
11731173
{
@@ -1186,6 +1186,7 @@ iga::Type BinaryEncodingIGA::getIGAType(G4_Type type)
11861186
case Type_V: return iga::Type::V;
11871187
case Type_VF: return iga::Type::VF;
11881188
case Type_NF: return iga::Type::NF;
1189+
11891190
default:
11901191
assert(false && "illegal type");
11911192
return iga::Type::INVALID;

visa/BinaryEncodingIGA.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class BinaryEncodingIGA
8585
static iga::ChannelOffset getIGAChannelOffset(int offset);
8686
static iga::MaskCtrl getIGAMaskCtrl(bool noMask);
8787
static iga::RegName getIGAARFName(G4_ArchRegKind areg);
88-
static iga::Type getIGAType(G4_Type type);
88+
static iga::Type getIGAType(G4_Type type, TARGET_PLATFORM genxPlatform);
8989

9090
/// getIGAInternalPlatform - a helper function to transform visa platform to iga platform
9191
static iga::Platform getIGAInternalPlatform(TARGET_PLATFORM genxPlatform);

0 commit comments

Comments
 (0)