Skip to content

Commit 731f79b

Browse files
weiyu-chensys_zuul
authored and
sys_zuul
committed
When stack is used, make sure the spill/fill temp is at least one GRF.
Change-Id: I255fd08b21b8ceec1e6c7a20242ed5d79ccd6f8c
1 parent 42f1fcd commit 731f79b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

visa/SpillManagerGMRF.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,11 +1245,13 @@ SpillManagerGRF::createTransientGRFRangeDeclare (
12451245
height = 1;
12461246
}
12471247

1248-
if( useScratchMsg_ )
1248+
bool usesStack = builder_->kernel.fg.getIsStackCallFunc() || builder_->kernel.fg.getHasStackCalls();
1249+
1250+
if (useScratchMsg_ || usesStack)
12491251
{
1250-
// Read/write size when using scratch msg descriptor is 32-bytes
1251-
if( height == 1 && width < REG_BYTE_SIZE )
1252-
width = REG_BYTE_SIZE/region->getElemSize();
1252+
// the message will read/write a minimum of one GRF
1253+
if (height == 1 && width < getGRFSize())
1254+
width = getGRFSize() / region->getElemSize();
12531255
}
12541256

12551257
G4_Declare * transientRangeDeclare =

0 commit comments

Comments
 (0)