compile: int h(int i, int j) { return i==0||j==0; } you get currently: _h: subfic r0,r3,0 adde r2,r0,r3 subfic r0,r4,0 adde r5,r0,r4 or r3,r2,r5 blr I would like gcc to produce: _h: cntlzw r5,r3 cntlzw r2,r4 or r0,r2,r5 srwi r3,r0,5 blr Which is smaller and faster. Note this will speed up gcc. Release: all (3.4) Environment: ppc-darwin6.5 How-To-Repeat: see description.
Fix: When converting the trees into rtl do this translation if the backend requests it. I tried to do it in combine but this did not work because it was replacing two rtls with two, so it rejected it.
confirmed on mainline (20030523).
This improves PR15524.
I have a fix, testing it right now.
A RFC here: <http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01818.html>.
I have not looked at this for a long time now.
Subject: Bug 10588 CVSROOT: /cvs/gcc Module name: gcc Changes by: dje@gcc.gnu.org 2005-06-08 14:46:14 Modified files: gcc : ChangeLog gcc/config/rs6000: rs6000.md Log message: * config/rs6000/rs6000.md (call_indirect_nonlocal_aix32): Prefer CTR to LR. (call_indirect_nonlocal_aix64): Same. (call_value_indirect_nonlocal_aix32): Same. (call_value_indirect_nonlocal_aix64): Same. PR target/10588 (eq): Use CLZ splitter for compare with zero. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9091&r2=2.9092 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.375&r2=1.376
On the mainline we get the following now: _h: cmpwi cr7,r3,0 li r3,1 beqlr- cr7 cntlzw r3,r4 srwi r3,r3,5 blr
David, looks like you fixed this long ago -- can this be closed?
Fixed.