Implemented RFE #1899189
[fw/sdcc] / src / z80 / peeph-z80.def
index a92ead4ebadba79ac9bc7c322a117e68bd161f49..706c6eadc488001c56801d01b0919a5d94a69ffe 100644 (file)
@@ -347,7 +347,7 @@ replace restart {
        ; peephole 0zf used hl instead of iy.
        ld      hl,#%1 + %2
        ld      (hl), %4
-} if notUsed('iy'), notUsed('hl')
+} if notUsed('iy'), notUsed('hl'), operandsNotRelated(%4 'h'), operandsNotRelated(%4 'l')
 
 replace restart {
        ld      e,l