@@ -772,7 +772,7 @@ SpillManagerGRF::calculateEncAlignedSegment (
772
772
unsigned regionDisp = getRegionDisp (region);
773
773
unsigned regionByteSize = getRegionByteSize (region, execSize);
774
774
775
- if ( useScratchMsg_ )
775
+ if ( need32ByteAlignedOffset () )
776
776
{
777
777
unsigned hwordLB = regionDisp & grfMask ();
778
778
unsigned hwordRB = hwordLB + G4_GRF_REG_NBYTES;
@@ -782,14 +782,14 @@ SpillManagerGRF::calculateEncAlignedSegment (
782
782
hwordRB += blockSize;
783
783
}
784
784
785
- assert ((hwordRB - hwordLB)/ REG_BYTE_SIZE <= 4 );
785
+ assert ((hwordRB - hwordLB) / REG_BYTE_SIZE <= 4 );
786
786
start = hwordLB;
787
787
end = hwordRB;
788
- type = grfMask ();
788
+ type = grfMask ();
789
789
}
790
790
else
791
791
{
792
- unsigned owordLB = regionDisp & owordMask ();
792
+ unsigned owordLB = regionDisp & owordMask ();
793
793
unsigned owordRB = owordLB + OWORD_BYTE_SIZE;
794
794
unsigned blockSize = OWORD_BYTE_SIZE;
795
795
@@ -798,10 +798,10 @@ SpillManagerGRF::calculateEncAlignedSegment (
798
798
blockSize *= 2 ;
799
799
}
800
800
801
- assert ((owordRB - owordLB)/ REG_BYTE_SIZE <= 4 );
801
+ assert ((owordRB - owordLB) / REG_BYTE_SIZE <= 4 );
802
802
start = owordLB;
803
803
end = owordRB;
804
- type = owordMask ();
804
+ type = owordMask ();
805
805
}
806
806
}
807
807
@@ -1239,9 +1239,7 @@ SpillManagerGRF::createTransientGRFRangeDeclare (
1239
1239
height = 1 ;
1240
1240
}
1241
1241
1242
- bool usesStack = builder_->kernel .fg .getIsStackCallFunc () || builder_->kernel .fg .getHasStackCalls ();
1243
-
1244
- if (useScratchMsg_ || usesStack)
1242
+ if (need32ByteAlignedOffset ())
1245
1243
{
1246
1244
// the message will read/write a minimum of one GRF
1247
1245
if (height == 1 && width < getGRFSize ())
0 commit comments