🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6299

optimizing comparison of long long to 0

#6299
From: Mark Bromley
Date: Tue, 12 Dec 1995 00:00
29 lines
880 bytes
The current code produced by gcc for comparing a long long (or
unsigned long long) to 0 is suboptimal for the sparc.  Currently the
compiler emits code like:

	cmp %o0, 0
	bne 1f
	<delay0>
	cmp %o1, 0
	be <zero_label>
	<delay1>
1:	b <non_zero_label>
	<delay2>

<zero_label>:
 	...

<non_zero_label>:
	...


Much better would be:

	orcc %o0, %o1, %g0
	bne <non_zero_label>
	<delay'>
<zero_label>:
	....
<non_zero_label>:
	...
Technical Details
Message-ID: <199512121525.KAA12345@gate3.fmr.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,14ceeca04a750d42,start
X-Google-Attributes: gid113d02,public
From: a200739@vantage.fmr.COM (Mark Bromley)
Subject: optimizing comparison of long long to 0
Date: 1995/12/12
Message-ID: <199512121525.KAA12345@gate3.fmr.com>
X-Deja-AN: 121609971
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
newsgroups: gnu.gcc.bug