mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Disabling too-aggressive optimization in OptCmp8
Generates incorrect code for some 16-bit cases. See: #895
This commit is contained in:
parent
448aa35f50
commit
3a3107b244
@ -885,11 +885,16 @@ unsigned OptCmp8 (CodeSeg* S)
|
||||
++Changes;
|
||||
}
|
||||
|
||||
/* If we have made changes above, we may also remove the compare */
|
||||
if (JumpsChanged) {
|
||||
CS_DelEntry (S, I);
|
||||
}
|
||||
|
||||
/* "If we have made changes above, we may also remove the compare."
|
||||
**
|
||||
** 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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user