mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
VarAction2: Mark suitable AND ops as jump insertion candidates
This commit is contained in:
parent
aa49e17e39
commit
06cc71b6c5
@ -6907,6 +6907,10 @@ static void OptimiseVarAction2Adjust(VarAction2OptimiseState &state, const GrfSp
|
|||||||
state.inference = VA2AIF_SIGNED_NON_NEGATIVE;
|
state.inference = VA2AIF_SIGNED_NON_NEGATIVE;
|
||||||
}
|
}
|
||||||
state.inference |= non_const_var_inference;
|
state.inference |= non_const_var_inference;
|
||||||
|
if ((state.inference & VA2AIF_ONE_OR_ZERO) && (prev_inference & VA2AIF_ONE_OR_ZERO)) {
|
||||||
|
adjust.adjust_flags |= DSGAF_JUMP_INS_HINT;
|
||||||
|
group->dsg_flags |= DSGF_CHECK_INSERT_JUMP;
|
||||||
|
}
|
||||||
try_merge_with_previous();
|
try_merge_with_previous();
|
||||||
break;
|
break;
|
||||||
case DSGA_OP_OR:
|
case DSGA_OP_OR:
|
||||||
|
Loading…
Reference in New Issue
Block a user