1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

mInverted NOT fix

This commit is contained in:
Brian Fiete 2024-10-24 18:13:36 -04:00
parent 76c58b3ed0
commit eb9ad2b6c2

View file

@ -6696,7 +6696,7 @@ void BeMCContext::InitializedPassHelper(BeMCBlock* mcBlock, BeVTrackingGenContex
auto cmpToBoolInst = AllocInst(BeMCInstKind_CmpToBool, BeMCOperand::FromCmpKind(cmpResult.mCmpKind), BeMCOperand(), instIdx + 1);
cmpToBoolInst->mResult = BeMCOperand::FromVReg(cmpResult.mResultVRegIdx);
if (cmpResult.mInverted)
AllocInst(BeMCInstKind_Not, cmpToBoolInst->mResult, instIdx + 2);
AllocInst(BeMCInstKind_Xor, cmpToBoolInst->mResult, BeMCOperand::FromImmediate(1), instIdx + 2);
}
inst->mResult = BeMCOperand();