Skip to content

Commit 3f0c186

Browse files
petechouigcbot
authored andcommitted
Re-enable vISA bounds checking.
Re-enable vISA bounds checking which was disabled accidentally.
1 parent 2987760 commit 3f0c186

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

visa/G4_IR.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6202,12 +6202,15 @@ void G4_Operand::updateFootPrint(BitSet &footprint, bool isSet,
62026202
return true;
62036203
return lb <= rb && rb < footprint.getSize();
62046204
};
6205-
// vISA_ASSERT(!builder.getOption(vISA_boundsChecking) || boundsChecking(),
6206-
// "Out-of-bounds access found in "
6207-
// << *getInst() << "\n"
6208-
// << "For operand " << *this << ", the footprint size is "
6209-
// << footprint.getSize() << " and the accessing range is ["
6210-
// << lb << ", " << rb << "]\n");
6205+
std::ostringstream instDump, opndDump;
6206+
vISA_ASSERT(!builder.getOption(vISA_boundsChecking) || boundsChecking(),
6207+
"Out-of-bounds access found in %s\nFor operand %s, the footprint "
6208+
"size is %u and the accessing range is [%u, %u]\n",
6209+
reinterpret_cast<std::ostringstream&>(instDump << *getInst())
6210+
.str().c_str(),
6211+
reinterpret_cast<std::ostringstream&>(opndDump << *this).str()
6212+
.c_str(),
6213+
footprint.getSize(), lb, rb);
62116214

62126215
if (doFastPath && lb % N == 0 && (rb + 1) % N == 0) {
62136216
// lb is 32-byte aligned, set one dword at a time

0 commit comments

Comments
 (0)