This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimizations on long long multiply/divide on PowerPC32 don't work
- From: Christoph Hellwig <hch at caldera dot de>
- To: Corey Minyard <minyard at acm dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 10 Dec 2001 18:07:09 +0100
- Subject: Re: Optimizations on long long multiply/divide on PowerPC32 don't work
- References: <3C115A53.2070206@acm.org>
On Fri, Dec 07, 2001 at 06:09:55PM -0600, Corey Minyard wrote:
> I can see four options to solve this problem:
>
> 1) Add __divdi3 to the linux kernel. I don't really think this is a
> good idea, and it shouldn't be required.
> 2) Move the conversion of the division to the function call to the
> very last stages of the compiler. IMHO, this is probably the best
> option, but it's a big job to implement, I think.
> 3) Make the optimizations understand the function calls. I don't even
> want to think about this one.
> 4) Modify the tree conversions to do the optimizations there. I have
> a patch that does this (and passes all regressions), because it was
> easy, but I consider it less optimal than option 2.
Fix that code to use shifts instead. As far as I can see that's general
linux kernel practice.
Christoph
--
Of course it doesn't work. We've performed a software upgrade.