From a28972638f803e9ab53aa6b1734d5f984cb3f660 Mon Sep 17 00:00:00 2001 From: Donn Seeley Date: Sat, 12 Dec 1987 04:16:23 -0800 Subject: [PATCH] utah rcsid 1.7 87/06/25 15:42:14: Spot sequences like 'cvtbl 4(ap),r0; movzbl r0,-4(fp)' in which the initial conversion is made redundant by a subsequent one. SCCS-vsn: old/pcc/c2.vax/c21.c 4.21 --- usr/src/old/pcc/c2.vax/c21.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr/src/old/pcc/c2.vax/c21.c b/usr/src/old/pcc/c2.vax/c21.c index 54bcc527d7..029e654387 100644 --- a/usr/src/old/pcc/c2.vax/c21.c +++ b/usr/src/old/pcc/c2.vax/c21.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)c21.c 4.20 %G%"; +static char sccsid[] = "@(#)c21.c 4.21 %G%"; #endif /* char C21[] = {"@(#)c21.c 1.83 80/10/16 21:18:22 JFR"}; /* sccs ident */ @@ -19,7 +19,7 @@ int bitsize[] = { /* index by type codes */ 8, /* 1 BYTE */ 16, /* 2 WORD */ 32, /* 3 LONG */ - 32, /* 4 FFLOAT / + 32, /* 4 FFLOAT */ 64, /* 5 DFLOAT */ 64, /* 6 QUAD */ 0, /* 7 OP2 */ @@ -577,6 +577,12 @@ register struct node *p; struct node *olduse=0; splitrand(p); if (p->op!=PUSH && p->subop && 0<=(r=isreg(lastrand)) && rforw) { + if ((p->op==CVT || p->op==MOVZ) + && (p->forw->op==CVT || p->forw->op==MOVZ) + && p->forw->subop&0xf + && compat(p->subop,p->forw->subop) + && !source(cp1=regs[RT1]) + && !indexa(cp1)) goto movit; if (equtype(p->subop,regs[r][0]) || ((p->op==CVT || p->op==MOVZ) && 0xf®s[r][0] && compat(0xf&(p->subop>>4),regs[r][0]))) { -- 2.20.1