Disabling too-aggressive optimization in OptCmp8
Generates incorrect code for some 16-bit cases. See: #895
This commit is contained in:
committed by
Oliver Schmidt
parent
448aa35f50
commit
3a3107b244
@@ -885,11 +885,16 @@ unsigned OptCmp8 (CodeSeg* S)
|
|||||||
++Changes;
|
++Changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we have made changes above, we may also remove the compare */
|
/* "If we have made changes above, we may also remove the compare."
|
||||||
if (JumpsChanged) {
|
**
|
||||||
CS_DelEntry (S, I);
|
** Removing the compare was too aggressive. E.g. for 16-bit compares the compiler
|
||||||
}
|
** may generate a branch to a second shared branch that still requires the flag
|
||||||
|
** result of the first compare instruction.
|
||||||
|
**
|
||||||
|
**if (JumpsChanged) {
|
||||||
|
** CS_DelEntry (S, I);
|
||||||
|
**}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
NextEntry:
|
NextEntry:
|
||||||
|
|||||||
Reference in New Issue
Block a user