Skip to content

Commit 44a01de

Browse files
paigealeigcbot
authored andcommitted
Revert "Improve error handling for raw send translation."
Revert "Improve error handling for raw send translation."
1 parent 74476cc commit 44a01de

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

visa/VisaToG4/TranslateSendRaw.cpp

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,29 +139,12 @@ int IR_Builder::translateVISARawSendsInst(
139139
sendMsgDesc->setEOT();
140140
}
141141

142-
int status = VISA_SUCCESS;
143-
std::stringstream ss;
144-
145-
if (sendMsgDesc->MessageLength() != numSrc0)
146-
{
147-
ss << "\nMessage length mismatch for raw sends\n";
148-
status = VISA_FAILURE;
149-
}
150-
if (!dstOpnd->isNullReg() && sendMsgDesc->ResponseLength() > numDst) {
151-
ss << "Response length mismatch for raw sends\n";
152-
status = VISA_FAILURE;
153-
}
154-
if (sendMsgDesc->extMessageLength() > numSrc1)
155-
{
156-
ss << "Extended message length mismatch for raw sends\n";
157-
status = VISA_FAILURE;
142+
MUST_BE_TRUE(sendMsgDesc->MessageLength() == numSrc0, "message length mismatch for raw sends");
143+
if (!dstOpnd->isNullReg()) {
144+
MUST_BE_TRUE(sendMsgDesc->ResponseLength() <= numDst, "response length mismatch for raw sends");
158145
}
146+
MUST_BE_TRUE(sendMsgDesc->extMessageLength() <= numSrc1, "extended message length mismatch for raw sends");
159147

160-
if (status != VISA_SUCCESS)
161-
{
162-
MUST_BE_TRUE(false, ss.str().c_str());
163-
return status;
164-
}
165148

166149
createSplitSendInst(
167150
predOpnd,

0 commit comments

Comments
 (0)