Skip to content

Commit 06bca29

Browse files
fangliu2020igcbot
authored andcommitted
Fix the address sub register number which can only be even value which is used as extend descriptor in send
Fix the address sub register number which can only be even value which is used as extend descriptor in send. This is a encoding restriction.
1 parent d3ebce4 commit 06bca29

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

visa/BuildIRImpl.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,8 +2639,12 @@ G4_InstSend *IR_Builder::createLscSendInst(
26392639
// The payload keeps reusing fixed a0.2 serializes loads. To improve the
26402640
// the performance issue caused by this, we create temp address
26412641
// variables and let RA to assign to spread out a0 usage.
2642-
if (getOption(vISA_dynamicAddrForExDescInLscSend))
2642+
if (useDynamicAddrForExDesc()) {
26432643
addrDecl = createTempAddress(1);
2644+
// Due to encoding restriction, address sub register number must be
2645+
// even value if it's used as extended message descriptor.
2646+
addrDecl->setSubRegAlign(Four_Word);
2647+
}
26442648
G4_DstRegRegion *addrDstOpnd = createDstRegRegion(addrDecl, 1);
26452649
if ((addrType == LSC_ADDR_TYPE_BSS) || (addrType == LSC_ADDR_TYPE_SS)) {
26462650
if (ssIdx == 0x0) {

visa/HWCaps.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,4 +919,8 @@ bool needTGMDoubleFenceWA() const {
919919
return VISA_WA_CHECK(getPWaTable(), Wa_14021891663) &&
920920
getOption(vISA_TGMDoubleFenceWA);
921921
}
922+
923+
bool useDynamicAddrForExDesc() const {
924+
return getOption(vISA_dynamicAddrForExDescInLscSend);
925+
}
922926
// end HW capabilities

0 commit comments

Comments
 (0)