Skip to content

Commit 10f0bac

Browse files
committed
opt: improve norm bool sequence
;; The sequence: ;; sbc a, a ; A is either 0 or -1 ;; sub 1 ;; sbc a, a ;; inc a ;; can be replaced by ;; neg ; A is either 0 or 1
1 parent 9068de3 commit 10f0bac

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
;; The sequence:
2+
;; sbc a, a ; A is either 0 or -1
3+
;; sub 1
4+
;; sbc a, a
5+
;; inc a
6+
;; can be replaced by
7+
;; neg ; A is either 0 or 1
8+
9+
OLEVEL: 1
10+
OFLAG: 15
11+
12+
REPLACE {{
13+
sbc a, a
14+
sub 1
15+
sbc a, a
16+
inc a
17+
}}
18+
19+
WITH {{
20+
sbc a, a
21+
neg
22+
}}

0 commit comments

Comments
 (0)