This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/16220] New: Jump pessimization
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2004 17:23:49 -0000
- Subject: [Bug tree-optimization/16220] New: Jump pessimization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
long ticks(long val, long high, long prev) {
return high + ((long) (val < prev) << 32);
}
gcc 3.3 produces this nice branch-free code:
cmplt a0,a2,v0
sll v0,0x20,t1
addq a1,t1,v0
whereas mainline introduces a branch and pointless constants:
cmplt a0,a2,a2
clr v0
beq a2,L14
lda t0,1
sll t0,0x20,v0
L14: addq v0,a1,v0
ret
--
Summary: Jump pessimization
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev68-unknown-linux-gnu
GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16220