Added some new patterns involving multiplies with 0, 1 etc.

This commit is contained in:
ceriel 1986-02-10 10:14:41 +00:00
parent 847de065d6
commit e2cfecffe3

View file

@ -119,6 +119,8 @@ loc sbi $1==-1 && $2==w: inc
loc inc sfit($1+1,8*w) : loc $1+1
loc adi $1==0 && $2==w:
ldc adi $1==0 && $2==2*w:
loc ads $1==0 && $2==w:
ldc ads $1==0 && $2==2*w:
zer adi $1==$2:
loc beq $1==0: zeq $2
loc bge $1==0: zge $2
@ -132,6 +134,10 @@ loc cmi tgt $1==0 && $2==w: tgt
loc cmi tle $1==0 && $2==w: tle
loc cmi tlt $1==0 && $2==w: tlt
loc cmi tne $1==0 && $2==w: tne
loc cmu teq $1==0 && $2==w: teq
loc cmu tne $1==0 && $2==w: tne
loc cmu zeq $1==0 && $2==w: zeq $3
loc cmu zne $1==0 && $2==w: zne $3
loc ior $1==0 && $2==w:
ldc ior $1==0 && $2==2*w:
zer ior $1==$2:
@ -148,9 +154,18 @@ loc bge $1==1: zgt $2
loc blt $1==1: zle $2
loc dvi $1==1 && $2==w:
ldc dvi $1==1 && $2==2*w:
loc dvu $1==1 && $2==w:
loc dvu $1==1 && $2==2*w:
loc loe adi $1==1 && $3==w: loe $2 inc
loc lol adi $1==1 && $3==w: lol $2 inc
loc mli $1==0 && $2==w: asp w loc 0
ldc mli $1==0 && $2==2*w: asp 2*w ldc 0
loc mlu $1==0 && $2==w: asp w loc 0
ldc mlu $1==0 && $2==2*w: asp 2*w ldc 0
loc mli $1==1 && $2==w:
ldc mli $1==1 && $2==2*w:
loc mlu $1==1 && $2==w:
ldc mlu $1==1 && $2==2*w:
loc sbi $1==1 && $2==w: dec
loc loe mli $3==w: loe $2 loc $1 mli w
loc lol mli $3==w: lol $2 loc $1 mli w