Fixed bugs #2728224, #2728218
[fw/sdcc] / src / z80 / peeph-z80.def
index ef6e078f74b0babb811349510f063a1072f11787..cf5a83d4f7d1ec66a522cb456f06b6a85c0f6447 100644 (file)
@@ -259,16 +259,17 @@ replace restart {
        ld      b, %2 (%3)
 } if notVolatile(%1), notUsed(%1)
 
-replace restart {
-       ld      %1,a
-       ld      %2,%3
-       ld      %4,%1
-} by {
-       ; peephole 0t loaded %4 from a instead of going through %1.
-       ld      %1,a
-       ld      %2,%3
-       ld      %4,a
-} if notVolatile(%1), operandsNotRelated(%1 %3), operandsNotRelated(%1 %2)
+// Bug #2728445
+//replace restart {
+//     ld      %1,a
+//     ld      %2,%3
+//     ld      %4,%1
+//} by {
+//     ; peephole 0t loaded %4 from a instead of going through %1.
+//     ld      %1,a
+//     ld      %2,%3
+//     ld      %4,a
+//} if notVolatile(%1), operandsNotRelated(%1 %3), operandsNotRelated(%1 %2)
 
 replace restart {
        ld      %1,a
@@ -1036,17 +1037,18 @@ replace restart {
 //     ; peephole 50 shortened or using a (which has just been tested to be #0x00).
 //} if operandsNotSame3(%3 '(bc)' '(de)')
 
-replace restart {
-       sub     a,%1
-       jp      NZ,%2
-       ld      a,%3
-       or      a,a
-} by {
-       sub     a,%1
-       jp      NZ,%2
-       or      a,%3
-       ; peephole 51 shortened or using a (which has just been tested to be #0x00).
-}
+// Commented out sine it triggers for %3 od the form (#...)
+//replace restart {
+//     sub     a,%1
+//     jp      NZ,%2
+//     ld      a,%3
+//     or      a,a
+//} by {
+//     sub     a,%1
+//     jp      NZ,%2
+//     or      a,%3
+//     ; peephole 51 shortened or using a (which has just been tested to be #0x00).
+//}
 //if operandsNotSame3(%3 '(bc)' '(de)')
 
 replace restart {