Merge pull request #3457 from alyssarosenzweig/bug/nzcv

RedundantFlagCalculationElimination: fix missing NEG case
This commit is contained in:
Alyssa Rosenzweig 2024-02-26 09:31:06 -04:00 committed by GitHub
commit 32a4abbea7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,6 +183,11 @@ DeadFlagCalculationEliminination::Classify(IROp_Header *IROp)
return {.Read = FlagsForCondClassType(Op->Cond)};
}
case OP_NEG: {
auto Op = IROp->CW<IR::IROp_Neg>();
return {.Read = FlagsForCondClassType(Op->Cond)};
}
case OP_CONDJUMP: {
auto Op = IROp->CW<IR::IROp_CondJump>();
if (!Op->FromNZCV)