@@ -346,12 +346,6 @@ G4_SrcRegRegion* HWConformity::insertCopyAtBBEntry(G4_BB* bb, G4_ExecSize execSi
346
346
G4_Operand* HWConformity::insertMovBefore (
347
347
INST_LIST_ITER it, uint32_t srcNum, G4_Type type, G4_BB* bb,
348
348
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)
355
349
{
356
350
G4_INST* inst = *it;
357
351
G4_SubReg_Align subAlign;
@@ -366,20 +360,13 @@ G4_Operand* HWConformity::insertMovBefore(INST_LIST_ITER it, uint32_t srcNum, G4
366
360
367
361
if (newExecSize > 1 )
368
362
{
369
- if (tmpStride )
363
+ if (scale == 1 && ! IS_VTYPE (src-> getType ()) )
370
364
{
371
- scale = tmpStride ;
365
+ scale = ( uint16_t )( getTypeSize (src-> getType ()) / getTypeSize (type)) ;
372
366
}
373
- else
367
+ if (scale == 0 )
374
368
{
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 ;
383
370
}
384
371
region = builder.createRegionDesc (scale, 1 , 0 );
385
372
}
@@ -4015,24 +4002,7 @@ bool HWConformity::generateAlign1Mad(G4_BB* bb, INST_LIST_ITER iter)
4015
4002
}
4016
4003
else
4017
4004
{
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 ;
4036
4006
}
4037
4007
}
4038
4008
else
0 commit comments