Skip to content

Commit 542e3a1

Browse files
weiyu-chenigcbot
authored andcommitted
Fix a bug when comparing two source regions as type was not considered.
1 parent cdb37dd commit 542e3a1

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

visa/Gen4_IR.hpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,14 +3046,21 @@ namespace vISA
30463046

30473047
bool operator==(const G4_SrcRegRegion &other)
30483048
{
3049-
if (base != other.base || regOff != other.regOff || subRegOff != other.subRegOff ||
3050-
desc->vertStride != other.desc->vertStride ||
3051-
desc->horzStride != other.desc->horzStride ||
3052-
desc->width != other.desc->width ||
3053-
mod != other.mod || acc != other.acc || immAddrOff != other.immAddrOff)
3054-
return false;
3055-
else
3056-
return true;
3049+
if (base != other.base || regOff != other.regOff || subRegOff != other.subRegOff ||
3050+
desc->vertStride != other.desc->vertStride ||
3051+
desc->horzStride != other.desc->horzStride ||
3052+
desc->width != other.desc->width ||
3053+
mod != other.mod || acc != other.acc || type != other.type)
3054+
{
3055+
return false;
3056+
}
3057+
3058+
if (acc == IndirGRF && immAddrOff != other.immAddrOff)
3059+
{
3060+
return false;
3061+
}
3062+
3063+
return true;
30573064
}
30583065

30593066
void computeLeftBound();

0 commit comments

Comments
 (0)