1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

CondBr fix

This commit is contained in:
Brian Fiete 2024-10-16 13:51:30 -04:00
parent 55298ee884
commit 76c47fde2e

View file

@ -3519,8 +3519,7 @@ void BeMCContext::CreateCondBr(BeMCBlock* mcBlock, BeMCOperand& testVal, const B
else if (testVal.mKind == BeMCOperandKind_CmpResult) else if (testVal.mKind == BeMCOperandKind_CmpResult)
{ {
// Beef-specific: assuming CMP results aren't stomped // Beef-specific: assuming CMP results aren't stomped
auto& cmpResult = mCmpResults[testVal.mCmpResultIdx]; auto& cmpResult = mCmpResults[testVal.mCmpResultIdx];
AllocInst(BeMCInstKind_CondBr, trueBlock, BeMCOperand::FromCmpKind(cmpResult.mCmpKind));
if (cmpResult.mInverted) if (cmpResult.mInverted)
{ {
AllocInst(BeMCInstKind_CondBr, falseBlock, BeMCOperand::FromCmpKind(cmpResult.mCmpKind)); AllocInst(BeMCInstKind_CondBr, falseBlock, BeMCOperand::FromCmpKind(cmpResult.mCmpKind));