Re: redundant divmodsi4 not optimized away

2010-04-28 Thread Greg McGary
On 04/28/10 05:58, Michael Matz wrote: On Tue, 27 Apr 2010, Greg McGary wrote: (define_insn "*udivmodsi4_libcall" [(set (reg:SI 4) (udiv:SI (reg:SI 1) (reg:SI 2))) (set (reg:SI 1) (umod:SI (reg:SI 1) (reg:SI 2))) (clobber (reg:SI 2)) (clobber (re

Re: redundant divmodsi4 not optimized away

2010-04-28 Thread Michael Matz
Hi, On Tue, 27 Apr 2010, Greg McGary wrote: > (define_insn "*udivmodsi4_libcall" > [(set (reg:SI 4) > (udiv:SI (reg:SI 1) > (reg:SI 2))) >(set (reg:SI 1) > (umod:SI (reg:SI 1) > (reg:SI 2))) >(clobber (reg:SI 2)) >(clobber (reg:SI 3)) >(clobber (reg:CC

Re: redundant divmodsi4 not optimized away

2010-04-27 Thread Greg McGary
On 04/26/10 22:09, Ian Lance Taylor wrote: Greg McGary writes: I have a port without div or mod machine instructions. I wrote divmodsi4 patterns that do the libcall directly, hoping that GCC would recognize the opportunity to use a single divmodsi4 to compute both quotient and remainder.

Re: redundant divmodsi4 not optimized away

2010-04-26 Thread Ian Lance Taylor
Greg McGary writes: > I have a port without div or mod machine instructions. I wrote > divmodsi4 patterns that do the libcall directly, hoping that GCC would > recognize the opportunity to use a single divmodsi4 to compute both > quotient and remainder. Alas, GCC calls divmodsi4 twice with the

redundant divmodsi4 not optimized away

2010-04-26 Thread Greg McGary
I have a port without div or mod machine instructions. I wrote divmodsi4 patterns that do the libcall directly, hoping that GCC would recognize the opportunity to use a single divmodsi4 to compute both quotient and remainder. Alas, GCC calls divmodsi4 twice with the same divisor and dividend