Skip to content

Commit

Permalink
Merge pull request #3457 from alyssarosenzweig/bug/nzcv
Browse files Browse the repository at this point in the history
RedundantFlagCalculationElimination: fix missing NEG case
  • Loading branch information
alyssarosenzweig authored Feb 26, 2024
2 parents 0ef72bf + 7deb497 commit 32a4abb
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 32a4abb

Please sign in to comment.