ld c,(hl)
} if notUsed('a'), notUsed('hl')
+replace restart {
+ ld de,#%2 + %3
+ ld a,(de)
+ ld e,a
+} by {
+ ; peephole 0j' used hl for #%2 + %3 instead of de, not going through a.
+ ld hl,#%2 + %3
+ ld e,(hl)
+} if notUsed('a'), notUsed('hl')
+
replace restart {
ex de,hl
push hl
ld %4,a
} if notVolatile(%1), operandsNotRelated(%1 %3), operandsNotRelated(%1 %2)
+replace restart {
+ ld %1,a
+ ld a,%2
+ adc a,#%3
+ ld %4,%1
+} by {
+ ld %1,a
+ ; peephole 0t' loaded %4 from a instead of going through %1.
+ ld %4,a
+ ld a,%2
+ adc a,#%3
+} if notVolatile(%1), operandsNotRelated(%1 %2), operandsNotRelated(%4 %2)
+
+replace restart {
+ ld %1,a
+ ld a,#%2
+ adc a,#%3
+ ld %4,%1
+} by {
+ ld %1,a
+ ; peephole 0t'' loaded %4 from a instead of going through %1.
+ ld %4,a
+ ld a,#%2
+ adc a,#%3
+} if notVolatile(%1)
+
replace restart {
ld %1,(hl)
ld e,%1
} by {
ld %1,a
or a,%2
- ; peephole 17 removed load by reordering or arguments.
+ ; peephole 17a removed load by reordering or arguments.
+} if notVolatile(%1)
+
+replace restart {
+ ld %1,a
+ ld a,%2 (ix)
+ or a,%1
+} by {
+ ld %1,a
+ or a,%2 (ix)
+ ; peephole 17b removed load by reordering or arguments.
} if notVolatile(%1)
replace restart {