From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f8a1,4ad4dd43d4959149 X-Google-Attributes: gid10f8a1,public X-Google-Thread: 1164f8,4ad4dd43d4959149 X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,4ad4dd43d4959149 X-Google-Attributes: gid102b75,public X-Google-ArrivalTime: 1993-08-10 19:31:39 PST Xref: gmd.de comp.arch:15486 comp.sys.dec:9404 vmsnet.alpha:713 Path: gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!nigel.msen.com!yale.edu!cmcl2!lab.ultra.nyu.edu!kenner From: kenner@lab.ultra.nyu.edu (Richard Kenner) Newsgroups: comp.arch,comp.sys.dec,vmsnet.alpha Subject: Re: Request for help with Alpha OSF C compiler (instruction scheduling) Date: 11 Aug 1993 02:13:42 GMT Organization: New York University Ultracomputer Research Lab Distribution: world Message-ID: <249kkm$ocj@cmcl2.NYU.EDU> References: <249bdeINN98a@phage.cshl.org> NNTP-Posting-Host: lab.ultra.nyu.edu In article <249bdeINN98a@phage.cshl.org> wchang@phage.cshl.org ( CSHL) writes: >I am implementing a very tight innermost loop consisting of six integer >"MAX" operations, 20 instructions altogether. While the C compiler produced >very tight code, using conditional-moves for "MAX", it apparently does >not optimize instruction scheduling. For example, it compiles > > if (a>b) b=a; > if (c>d) d=c; >to > cmple a,b,$0 > cmoveq $0,a,b > cmple c,d,$0 > cmoveq $0,c,d > >which disrupts the pipeline (instruction latency plus register $0 bottleneck) >and causes 50% performance degradation. GCC certainly ought to be able to get it right, though I haven't tried that particular case since I'd need a larger code fragment.