@@ -772,7 +772,7 @@ SpillManagerGRF::calculateEncAlignedSegment (
772772 unsigned regionDisp = getRegionDisp (region);
773773 unsigned regionByteSize = getRegionByteSize (region, execSize);
774774
775- if ( useScratchMsg_ )
775+ if ( need32ByteAlignedOffset () )
776776 {
777777 unsigned hwordLB = regionDisp & grfMask ();
778778 unsigned hwordRB = hwordLB + G4_GRF_REG_NBYTES;
@@ -782,14 +782,14 @@ SpillManagerGRF::calculateEncAlignedSegment (
782782 hwordRB += blockSize;
783783 }
784784
785- assert ((hwordRB - hwordLB)/ REG_BYTE_SIZE <= 4 );
785+ assert ((hwordRB - hwordLB) / REG_BYTE_SIZE <= 4 );
786786 start = hwordLB;
787787 end = hwordRB;
788- type = grfMask ();
788+ type = grfMask ();
789789 }
790790 else
791791 {
792- unsigned owordLB = regionDisp & owordMask ();
792+ unsigned owordLB = regionDisp & owordMask ();
793793 unsigned owordRB = owordLB + OWORD_BYTE_SIZE;
794794 unsigned blockSize = OWORD_BYTE_SIZE;
795795
@@ -798,10 +798,10 @@ SpillManagerGRF::calculateEncAlignedSegment (
798798 blockSize *= 2 ;
799799 }
800800
801- assert ((owordRB - owordLB)/ REG_BYTE_SIZE <= 4 );
801+ assert ((owordRB - owordLB) / REG_BYTE_SIZE <= 4 );
802802 start = owordLB;
803803 end = owordRB;
804- type = owordMask ();
804+ type = owordMask ();
805805 }
806806}
807807
@@ -1239,9 +1239,7 @@ SpillManagerGRF::createTransientGRFRangeDeclare (
12391239 height = 1 ;
12401240 }
12411241
1242- bool usesStack = builder_->kernel .fg .getIsStackCallFunc () || builder_->kernel .fg .getHasStackCalls ();
1243-
1244- if (useScratchMsg_ || usesStack)
1242+ if (need32ByteAlignedOffset ())
12451243 {
12461244 // the message will read/write a minimum of one GRF
12471245 if (height == 1 && width < getGRFSize ())
0 commit comments