Skip to content

Commit 03cacdf

Browse files
Dimus77igcbot
authored andcommitted
Changes in code.
1 parent 42469d1 commit 03cacdf

File tree

2 files changed

+5
-37
lines changed

2 files changed

+5
-37
lines changed

visa/HWConformity.cpp

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,6 @@ G4_SrcRegRegion* HWConformity::insertCopyAtBBEntry(G4_BB* bb, G4_ExecSize execSi
346346
G4_Operand* HWConformity::insertMovBefore(
347347
INST_LIST_ITER it, uint32_t srcNum, G4_Type type, G4_BB* bb,
348348
G4_SubReg_Align tmpAlign)
349-
{
350-
return insertMovBefore(it, srcNum, type, bb, 0, tmpAlign);
351-
}
352-
353-
G4_Operand* HWConformity::insertMovBefore(INST_LIST_ITER it, uint32_t srcNum, G4_Type type, G4_BB* bb,
354-
uint16_t tmpStride, G4_SubReg_Align tmpAlign)
355349
{
356350
G4_INST* inst = *it;
357351
G4_SubReg_Align subAlign;
@@ -366,20 +360,13 @@ G4_Operand* HWConformity::insertMovBefore(INST_LIST_ITER it, uint32_t srcNum, G4
366360

367361
if (newExecSize > 1)
368362
{
369-
if (tmpStride)
363+
if (scale == 1 && !IS_VTYPE(src->getType()))
370364
{
371-
scale = tmpStride;
365+
scale = (uint16_t)(getTypeSize(src->getType()) / getTypeSize(type));
372366
}
373-
else
367+
if (scale == 0)
374368
{
375-
if (scale == 1 && !IS_VTYPE(src->getType()))
376-
{
377-
scale = (uint16_t)(getTypeSize(src->getType()) / getTypeSize(type));
378-
}
379-
if (scale == 0)
380-
{
381-
scale = 1;
382-
}
369+
scale = 1;
383370
}
384371
region = builder.createRegionDesc(scale, 1, 0);
385372
}
@@ -4015,24 +4002,7 @@ bool HWConformity::generateAlign1Mad(G4_BB* bb, INST_LIST_ITER iter)
40154002
}
40164003
else
40174004
{
4018-
// Promote src2 from :b to :w to allow mad, for example:
4019-
// pseudo_mad (16) V211(0,0)<1>:d V210(0,0)<1;0>:d V106(0,0)<0;0>:b V81(0,0)<1;0>:d
4020-
// =>
4021-
// mov (1) TV74(0,0)<1>:w V106(0,0)<0;1,0>:b {Q1, Align1, NoMask}
4022-
// mad (16) V211(0,0)<1>:d V81(0,0)<1;0>:d V210(0,0)<1;0>:d TV74(0,0)<0;0>:w {H1, Align1}
4023-
4024-
bool isSrc2 = (k == 0);
4025-
if (builder.noSrc2Regioning() && isSrc2 && IS_BTYPE(src->getType()))
4026-
{
4027-
G4_Type type = (src->getType() == Type_UB) ? Type_UW : Type_W;
4028-
auto dstStrideInBytes = inst->getDst()->getHorzStride() * getTypeSize(inst->getDst()->getType());
4029-
uint16_t stride = (uint16_t)(dstStrideInBytes / getTypeSize(type));
4030-
inst->setSrc(insertMovBefore(iter, k, type, bb, stride, GRFALIGN), k);
4031-
}
4032-
else
4033-
{
4034-
return false;
4035-
}
4005+
return false;
40364006
}
40374007
}
40384008
else

visa/HWConformity.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ namespace vISA
7979
G4_DstRegRegion* insertMovAfter(INST_LIST_ITER& it, G4_DstRegRegion* dst, G4_Type type, G4_BB *bb, G4_SubReg_Align dstAlign = Any);
8080
G4_Operand* insertMovBefore(INST_LIST_ITER it, uint32_t srcNum, G4_Type type, G4_BB *bb,
8181
G4_SubReg_Align tmpAlign = Any);
82-
G4_Operand* insertMovBefore(INST_LIST_ITER it, uint32_t srcNum, G4_Type type, G4_BB* bb,
83-
uint16_t stride, G4_SubReg_Align tmpAlign = Any);
8482

8583
// replace src <srcNum> for inst <*it> with a temp variable of type <type>
8684
// This is used to satisfy various HW restrictions on src type/alignment/region/modifier/etc.

0 commit comments

Comments
 (0)