run branch fixer again after replacing BRA by JMP. should fix #1936

This commit is contained in:
mrdudz
2022-12-11 12:08:30 +01:00
parent 299f764c5d
commit ddab16007a
2 changed files with 97 additions and 0 deletions

View File

@@ -850,6 +850,10 @@ static unsigned RunOptGroup7 (CodeSeg* S)
C += RunOptFunc (S, &DOptJumpCascades, 1);
C += RunOptFunc (S, &DOptBranchDist2, 1);
/* Adjust branch distances again, since the previous step may change code
between branches */
C += RunOptFunc (S, &DOptBranchDist, 3);
Changes += C;
/* If we had changes, we must run dead code elimination again,
** since the changes may have introduced dead code.