This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] fold-const trick for gzip
On Dec 9, 2003, at 14:58, Dale Johannesen wrote:
On Dec 9, 2003, at 2:41 PM, Andrew Pinski wrote:
In gzip, there is a place where the code could be using unconditional
code
instead of conditional code for speed and size (at least on PPC).
It turns (A > (2^n)-1) ? (A - 2^n) : 0 into (-(A >> n))&(A-2^n) where
n+1
is the size of the conditional type in bits.
I don't think that's right. Try A=17, n=3. I think it works if A also
meets certain
other conditions which the one in gzip does.
n+1 has to be the size of conditional type in bits, so there is no type
where 3+1 is the size.
Thanks,
Andrew Pinski